Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                	<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>
              
            
!

CSS

              
                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;	
}
              
            
!

JS

              
                
              
            
!
999px

Console