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

              
                <details class="side-cam-list" open>
                        <summary>监控中心</summary>
                        <details open>
                            <summary>平安中心</summary>
                            <details open>
                                <summary>西区95栋</summary>
                                <div type="01" controls="true" draggable="true">枪型摄像头01</div>
                                <div type="02" draggable="true">球形摄像头02</div>
                                <div type="02" controls="true" draggable="true">球形摄像头04</div>
                                <div type="01" draggable="true">枪型摄像头05</div>
                                <div type="01" draggable="true">枪型摄像头06</div>
                                <div type="01" draggable="true">枪型摄像头07</div>
                            </details>
                        </details>
                        <details open>
                            <summary>平安中心2</summary>
                            <details open>
                                <summary>西区95栋</summary>
                                <div type="01" draggable="true">枪型摄像头01</div>
                                <div type="02" controls="true" draggable="true">球形摄像头02</div>
                                <div type="02" draggable="true">球形摄像头04</div>
                                <div type="01" draggable="true">枪型摄像头05</div>
                                <div type="01" draggable="true">枪型摄像头06</div>
                                <div type="01" draggable="true">枪型摄像头07</div>
                            </details>
                        </details>
                    </details>
              
            
!

CSS

              
                ::-webkit-details-marker {
    display: none;
}

::-moz-list-bullet {
    font-size: 0;
    float: left;
}
body{
  margin:0;
  padding:20px;
  background:#333;
  color:#fff;
}
.side-cam-list{
    position: relative;
    padding-top:20px; 
    opacity: .8;
    font-size: 14px;
    line-height: 22px;
}
.side-cam-list div{
    cursor: pointer;
    margin: 4px 0;
}


.side-cam-list,.side-cam-list details,.side-cam-list div{
    padding-left: 25px;
}

.side-cam-list div{
    padding-left: 18px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .5) 1px, transparent 0) repeat-y left, repeating-linear-gradient(to right,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat left center;
    background-size: 1px 2px, 18px 1px;
}

.side-cam-list div[controls="true"]{
    background: radial-gradient(closest-side circle at center , #0def45 3.5px,transparent 0) no-repeat 6px center, linear-gradient(to bottom, rgba(255, 255, 255, .5) 1px, transparent 0) repeat-y left, repeating-linear-gradient(to right,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat left center;
    background-size: 7px 7px, 1px 2px, 18px 1px;
}

.side-cam-list summary {
    user-select: none;
    cursor: pointer;
    margin: 2px 0 2px -25px;
    background: repeating-linear-gradient(to right,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat 14px center;
    background-size: 9px 1px;
}

.side-cam-list details {
    padding: 4px 0 4px 25px;
    margin: -4px 0 -4px;
    background: repeating-linear-gradient(to bottom,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat 6px top;
    background-size: 1px 9px;
}

.side-cam-list details:not(:last-of-type) {
    background: repeating-linear-gradient(to bottom,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat 6px top,repeating-linear-gradient(to bottom,rgba(255, 255, 255, .5), rgba(255, 255, 255, .5) 1px, transparent, transparent 2px) no-repeat 6px bottom;
    background-size: 1px 9px,1px calc( 100% - 25px );
}

.side-cam-list summary::before {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    color: rgba(255, 255, 255, .5);
    border: 1px solid;
    background: linear-gradient(to right, currentColor, currentColor) no-repeat center, linear-gradient(to top, currentColor, currentColor) no-repeat center;
    background-size: 1px 9px, 9px 1px;
    vertical-align: -2px;
    margin-right: 11px;
    
}

[open]>summary::before {
    background: linear-gradient(to right, currentColor, currentColor) no-repeat center;
    background-size: 9px 1px;
}

.side-cam-list div::after {
    position: absolute;
    content: '\A0';
    left: 0;
    right: 0;
    background: #2fa2f2;
    z-index: -1;
    opacity: 0;
    transition: .3s;
}

.side-cam-list div:hover::after {
    opacity: 1;
}

.side-cam-list div[type="02"]::before{
    background-position: left -22px;
}
              
            
!

JS

              
                
              
            
!
999px

Console