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="top"></div>

<div class="middle">
	<div class="container">
		<h1>DETAILS</h1>
		
		<details>
			<summary>About</summary>
			<div class="content">
				<div>
					<p>The &lt;details&gt; tag is new in HTML5.</p>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Definition &amp; Usage</summary>
			<div class="content">
				<div>
					<ol>
						<li>The &lt;details&gt; tag specifies additional details that the user can view or hide on demand.</li>
						<li class="mtb8">The &lt;details&gt; tag can be used to create an interactive widget that the user can open and close.</li>
						<li class="mb8">Any sort of content can be put inside the &lt;details&gt; tag.</li>
						<li>The content of a &lt;details&gt; element should not be visible unless the open attribute is set.</li>
					</ol>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Browser Support</summary>
			<div class="content">
				<div>
					<p>The numbers in the table specify the first browser version that fully supports the element.</p>
					<table class="mt8">
						<tr>
							<th class="element">Element</th>
							<th class="chrome" title="Chrome"></th>
							<th class="edge" title="Internet Explorer / Edge"></th>
							<th class="firefox" title="Firefox"></th>
							<th class="safari" title="Safari"></th>
							<th class="opera" title="Opera"></th>
						</tr>
						<tr>
							<td>&lt;details&gt;</td>
							<td>12.0</td>
							<td class="not-support">&Cross;</td>
							<td>49.0</td>
							<td>6.0</td>
							<td>15.0</td>
						</tr>
					</table>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Tips &amp; Notes</summary>
			<div class="content">
				<div>
					<ol>
						<li class="mb8">The &lt;summary&gt; tag is used to specify a visible heading for the details.</li>
						<li>The heading can be clicked to view/hide the details.</li>
					</ol>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Attributes</summary>
			<div class="content">
				<div>
					<table>
						<tr>
							<th>Default</th>
							<th>Global</th>
							<th>Event</th>
						</tr>
						<tr>
							<td>open</td>
							<td class="support">&check;</td>
							<td class="support">&check;</td>
						</tr>
					</table>
				</div>
			</div>
		</details>
	</div>
		
	<div class="container">
		<h1>SUMMARY</h1>
			
		<details>
			<summary>About</summary>
			<div class="content">
				<div>
					<p>The &lt;summary&gt; tag is new in HTML5.</p>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Definition &amp; Usage</summary>
			<div class="content">
				<div>
					<ol>
						<li class="mb8">The &lt;summary&gt; tag defines a visible heading for the &lt;details&gt; element.</li>
						<li>The heading can be clicked to view/hide the details.</li>
					</ol>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Browser Support</summary>
			<div class="content">
				<div>
					<p>The numbers in the table specify the first browser version that fully supports the element.</p>
					<table class="mt8">
						<tr>
							<th class="element">Element</th>
							<th class="chrome" title="Chrome"></th>
							<th class="edge" title="Internet Explorer / Edge"></th>
							<th class="firefox" title="Firefox"></th>
							<th class="safari" title="Safari"></th>
							<th class="opera" title="Opera"></th>
						</tr>
						<tr>
							<td>&lt;summary&gt;</td>
							<td>12.0</td>
							<td class="not-support">&Cross;</td>
							<td>48.0</td>
							<td>6.0</td>
							<td>15.0</td>
						</tr>
					</table>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Tips &amp; Notes</summary>
			<div class="content">
				<div>
					<ol>
						<li>The &lt;summary&gt; element should be the first child element of the &lt;details&gt; element.</li>
					</ol>
				</div>
			</div>
		</details>
			
		<details>
			<summary>Attributes</summary>
			<div class="content">
				<div>
					<table>
						<tr>
							<th>Default</th>
							<th>Global</th>
							<th>Event</th>
						</tr>
						<tr>
							<td>none</td>
							<td class="support">&check;</td>
							<td class="support">&check;</td>
						</tr>
					</table>
				</div>
			</div>
		</details>
	</div>
</div>
	
<div class="bottom"></div>

<!-- This is not part of Pen -->
<a class="me" href="https://codepen.io/uzcho_/pens/popular/?grid_type=list" target="_blank" style="color:#000"></a>
              
            
!

CSS

              
                body{font-family:Arial,Helvetica,sans-serif;font-weight:400}
p{margin:0;padding:0}

h1{
	margin:0 0 16px 0;
	padding:20px 0 32px 0;
	font-size:22px;
	text-align:center;
	border-bottom:1px solid #a3a3a3
	}

ol{
	margin:0;
	padding:0 16px;
	list-style-type:lower-alpha;
	list-style-position:outside
	}

ol,p,table
	{font-size:14px}

table
	{width:100%;border-collapse:collapse;text-align:center}

table,th,td
	{border:1px solid #a3a3a3}

th,td{height:40px}

tr:nth-child(even){background:#f1f1f1}

.mt8{margin:8px 0 0 0}
.mtb8{margin:8px 0}
.mb8{margin:0 0 8px 0}
.element{width:20%}

.chrome{background:url(https://image.flaticon.com/icons/png/128/732/732205.png)no-repeat center / contain;background-size:24px 24px;width:16%}

.edge{background:url(https://image.flaticon.com/icons/png/128/732/732219.png)no-repeat center / contain;background-size:24px 24px;width:16%}

.firefox{background:url(https://image.flaticon.com/icons/png/128/183/183320.png)no-repeat center / contain;background-size:24px 24px;width:16%}

.safari{background:url(https://image.flaticon.com/icons/png/128/226/226774.png)no-repeat center / contain;background-size:24px 24px;width:16%}

.opera{background:url(https://image.flaticon.com/icons/png/128/732/732233.png)no-repeat center / contain;background-size:24px 24px;width:16%}

.not-support{color:#ff0000}
.support{color:#008800}

::-webkit-scrollbar{width:0}

.top:before,
.top:after,
.middle:before,
details:before,
summary:before,
.content:before,
.content:after,
.bottom:before,
.bottom:after
	{display:block;position:absolute;content:""}

.top:before,
.top:after,
.bottom:before,
.bottom:after{
	background:#fff;
	width:50%;
	height:40px;
	border-radius:50%
	}

.top:before,
.bottom:before,
.container:nth-of-type(1)
	{left:0}

.top:after,
.bottom:after,
.container:nth-of-type(2)
	{right:0}

details,
summary,
.content,
.content div
	{display:block;position:relative;float:left}

.top{
	width:100%;
	min-height:5%;
	top:0;
	display:block;
	position:absolute
	}

.top:before,
.top:after
	{bottom:-20px;border-top:4px solid rgba(0,0,0,.5)}

.middle{
	width:100%;
	min-height:90%;
	top:5%;
	display:block;
	position:absolute;
	overflow:hidden
	}

.middle:before{
	background:rgba(0,0,0,.5);
	width:5px;
	height:100%;
	top:0;
	left:50%;
	border-radius:50%;
	transform:translate(-50%,0)
	}

.container{
	width:50%;
	height:100%;
	padding:0 16px;
	display:block;
	position:absolute;
	overflow-y:auto;
	z-index:1
	}

details
	{width:100%;padding:16px 0}

details:before{
	background:#f1f1f1 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAOVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8dlA9AAAAEnRSTlMA0hT07m5444FAPNizWzYJlGlYgInEAAAAVElEQVQY03XISxZAMBQE0X4JEvKj979YYRDNOWp2C08upxVqI72cVj31OFu266ThKdwnD8+e/ZgTk0t9m9Y+dj/mroaFSDVYcKhBi4hikFaCGOypT5VcBRUgZV1FAAAAAElFTkSuQmCC)no-repeat center / contain;
	width:16px;
	height:16px;
	top:24px;
	left:5px;
	z-index:1
	}

summary{
	background:#f1f1f1;
	width:100%;
	padding:8px;
	font-size:16px;
	cursor:pointer;
	outline:none;
	box-shadow:0 8px 6px -6px #dbdbdb
	}

summary:before{
	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAFVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQCkAAAABnRSTlMAgMtyGb/pp2U/AAAALklEQVQI12MAAicVBggwS4YyxBIJMJwFBcNSBQVNGNTSwCAJzkBIETYHYSncGQAQlw573Q0dGgAAAABJRU5ErkJggg==)no-repeat center / contain;
	width:8px;
	height:8px;
	top:12px;
	right:8px
	}

summary:focus:before
	{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMAf8tyGRWvfG4AAAAaSURBVAjXYyAPOAuCgQmDaigYBMEZCCmyAADd7Qal1Zq1fwAAAABJRU5ErkJggg==)no-repeat center / contain}

.content
	{width:100%;padding:0 16px}

.content:before{
	width:16px;
	top:0;
	left:0;
	border-bottom:8px solid transparent;
	border-right:16px solid #dbdbdb
	}

.content:after{
	width:16px;
	top:0;
	right:0;
	border-bottom:8px solid transparent;
	border-left:16px solid #dbdbdb
	}

.content div{
	width:100%;
	padding:8px;
	border:1px solid #e6e6e6;
	border-top:none
	}

.bottom{
	width:100%;
	min-height:5%;
	bottom:0;
	display:block;
	position:absolute
	}

.bottom:before,
.bottom:after
	{top:-20px;border-bottom:4px solid rgba(0,0,0,.5)}

@media (max-width:767px){
	.top:before,
	.bottom:before
		{width:100%}
	
	.top:after,
	.middle:before,
	.bottom:after
		{display:none}
	
	.container{width:100%;height:50%}
	.container:nth-of-type(1){top:0}
	.container:nth-of-type(2){bottom:0}
	.container:nth-of-type(2) h1{padding:32px 0}
	}
              
            
!

JS

              
                
              
            
!
999px

Console