Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              	<div class="show">
		<div class="demo">
			<details open="">
				<summary>
					<dt>订单中心</dt>
				</summary>
				<dd>
					<a href="">我的订单</a>
				</dd>
				<dd>
					<a href="">我的活动</a>
				</dd>
				<dd>
					<a href="">评价晒单</a>
				</dd>
				<dd>
					<a href="">购物助手</a>
				</dd>
			</details>
			<details open="">
				<summary>
					<dt>关注中心</dt>
				</summary>
				<dd>
					<a href="">关注的商品</a>
				</dd>
				<dd>
					<a href="">关注的店铺</a>
				</dd>
				<dd>
					<a href="">关注的专辑</a>
				</dd>
				<dd>
					<a href="">收藏的内容</a>
				</dd>
			</details>
			<details open="">
				<summary>
					<dt>资产中心</dt>
				</summary>
				<dd>
					<a href="">余额</a>
				</dd>
				<dd>
					<a href="">优惠券</a>
				</dd>
				<dd>
					<a href="">礼品卡</a>
				</dd>
			</details>
		</div>
	</div>
            
          
!
            
              body {
  display: flex;
  justify-content: center;
  padding: 2vw;
}
.show{
  padding-bottom:20px;
  min-width: 50vw;
}
.show h5{
  font-size:13px; 
  line-height:20px; 
  padding:10px 0 2px 2px; 
  margin:0 0 0 8px;
}
.demo{
  padding:10px;
}
details {
  margin: 1rem 0;
}
details:active,
details:focus,
summary:active,
summary:focus{
  outline: none 0;
}
/* 隐藏默认三角 */
::-webkit-details-marker {
    display: none;
}
::-moz-list-bullet {
    font-size: 0;
    float: left;
}
summary {
    user-select: none;
    outline: 0;
}
dt::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    margin: 4px 0 0 .5ch;
    background: url(http://www.zhangxinxu.com/study/201801/arrow-on.svg) no-repeat;
    background-size: 100% 100%;
    transition: transform .2s;
}
[open] dt::after {
    transform: rotate(90deg);
}
dd {
	margin: 0;
}
dd > a {
	color: #666;
}

a:hover {
	text-decoration: none;	
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console