HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="" id="scrollbox" style="display: block; outline:none">
<br>
<span>--------------------------------------------------<br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi viverra bibendum finibus. Suspendisse consequat vehicula nulla ac ornare. Donec auctor gravida velit vitae commodo.<br>
--------------------------------------------------<br></span> <!-- 1.0.0 -->
<div class="menu_header" id="menu_header1">
<a href="#" onclick="Effect.toggle('menu_block1', 'slide', {duration:0.4}); return true;">1.0.0</a>
<div class="menu_block" id="menu_block1" style="display:none">
<div>
<!-- 1.1.0 -->
<div class="menu_header" id="menu_header1a">
<a href="#" onclick="Effect.toggle('menu_block1a', 'slide', {duration:0.4}); return false;">1.1.0</a>
<div class="menu_block" id="menu_block1a" style="display:none">
<p>
Aenean iaculis molestie eros, a hendrerit diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam non libero id tellus feugiat consectetur at a
elit. Praesent facilisis semper risus quis tempus. Curabitur commodo lectus eu sodales dignissim. Curabitur porta mattis urna, eu convallis massa. Suspendisse non dictum urna, eu dictum augue.
Nunc et commodo magna.<br>
</p>
</div>
</div><!-- 1.2.0 -->
<div class="menu_header" id="menu_header1b">
<a href="#" onclick="Effect.toggle('menu_block1b', 'slide', {duration:0.4}); return false;">1.2.0</a>
<div class="menu_block" id="menu_block1b" style="display:none">
<p>
Vestibulum odio dui, fringilla vitae sapien non, vulputate interdum leo. Morbi non porttitor justo. Pellentesque a risus vitae urna vestibulum pulvinar in id purus. Mauris pharetra eros
elementum hendrerit faucibus. Cras tincidunt ornare justo, eget tincidunt magna. Aenean mollis dui in accumsan interdum. Morbi vulputate eleifend pellentesque. Sed ac pulvinar felis.<br>
</p>
</div>
</div>
</div>
</div>
</div>--------------------------------------------------<br>
<!-- 2.0.0 -->
<div class="menu_header" id="menu_header2">
<a href="#" onclick="Effect.toggle('menu_block2', 'slide', {duration:0.4}); return true;">2.0.0</a>
<div class="menu_block" id="menu_block2" style="display:none">
<div>
<!-- 2.1.0 -->
<div class="menu_header" id="menu_header2a">
<a href="#" onclick="Effect.toggle('menu_block2a', 'slide', {duration:0.4}); return false;">2.1.0</a>
<div class="menu_block" id="menu_block2a" style="display:none">
<p>
Vivamus a ullamcorper augue. Sed quis magna vitae tortor egestas rutrum. Pellentesque id consequat metus, sit amet interdum nisi. Pellentesque efficitur, odio sit amet tristique mollis, quam
nisi aliquam arcu, sit amet ultricies enim lorem at est. Sed volutpat at ante a dictum. Quisque nec condimentum dui. Praesent mollis ligula metus, sit amet venenatis felis pretium id. Aliquam
erat volutpat.<br>
</p>
</div>
</div><!-- 2.2.0 -->
<div class="menu_header" id="menu_header2b">
<a href="#" onclick="Effect.toggle('menu_block2b', 'slide', {duration:0.4}); return false;">2.2.0</a>
<div class="menu_block" id="menu_block2b" style="display:none">
<p>
Vestibulum malesuada libero vel euismod maximus. Curabitur venenatis nisl volutpat faucibus congue. Sed quis tortor lacus. Suspendisse porta pellentesque orci sed sodales. Quisque finibus
lectus in libero sagittis mattis. Nunc maximus tincidunt convallis. Quisque laoreet erat eros, sed mattis justo rutrum scelerisque. Interdum et malesuada fames ac ante ipsum primis in
faucibus.<br>
</p>
</div>
</div>
</div>
</div>
</div>--------------------------------------------------<br>
<!-- 3.0.0 -->
<div class="menu_header" id="menu_header20">
<a href="#" onclick="Effect.toggle('menu_block20', 'slide', {duration:0.7}); return false;">3.0.0</a>
<div class="menu_block" id="menu_block20" style="display:none">
<p>
Proin ac risus iaculis, sollicitudin mi sit amet, ornare massa. Nunc nec leo nec tortor porta gravida sed faucibus est. Duis ac ante sed ligula faucibus tristique. Morbi sed fringilla lectus.
Suspendisse ut sollicitudin velit. Donec sed eleifend orci. Vestibulum erat metus, viverra in ante at, semper tempor ligula. Donec laoreet nulla in dui venenatis malesuada. Etiam velit lacus,
pellentesque vitae ante sed, tristique vehicula eros.<br>
<br>
Donec semper convallis risus a viverra. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus turpis velit, laoreet ut lectus elementum, hendrerit lobortis
leo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam ullamcorper augue eget sapien tempus eleifend. Ut suscipit, elit quis consequat facilisis, justo felis tristique erat,
dignissim finibus dolor nulla eu metus. Nunc diam nunc, auctor faucibus risus at, tincidunt lobortis justo. Sed a varius augue.<br>
<br>
Nulla a lobortis purus, quis mattis lacus. Aliquam eu suscipit sem, sed pharetra tellus. Phasellus vel pretium erat. Fusce cursus ipsum ac dui finibus, id vulputate nunc porta. Vestibulum ante
ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur arcu sem, fermentum non sollicitudin et, bibendum a dolor. Proin at tortor pellentesque, finibus arcu id,
tincidunt tellus. Suspendisse vel libero arcu. Nullam maximus sapien neque, in vulputate neque vulputate sed. Phasellus ornare, dolor quis varius dignissim, tellus neque auctor metus, id
dignissim nibh magna at tortor.<br>
<br>
Aliquam et interdum ligula. Nulla mollis massa feugiat lorem vehicula, a dictum nunc convallis. Quisque bibendum sit amet nisi sit amet eleifend. Cras vitae tortor venenatis, vulputate turpis ac,
scelerisque eros. Pellentesque auctor bibendum diam. Phasellus nibh magna, tempor vitae turpis eu, vehicula laoreet tortor. Sed id euismod lacus, sed egestas erat. Praesent tristique in nulla nec
pulvinar. Aliquam pellentesque nibh purus, a bibendum metus tempor at. Fusce eu dolor vel justo pretium fermentum vitae et est. Aenean pretium auctor libero at porttitor. Proin a tortor
fermentum, aliquet eros quis, condimentum purus.<br>
</p>
</div>
</div>--------------------------------------------------<br>
<!-- 4.0.0 -->
<div class="menu_header" id="menu_header30">
<a href="#" onclick="Effect.toggle('menu_block30', 'slide', {duration:0.5}); return false;">4.0.0</a>
<div class="menu_block" id="menu_block30" style="display:none">
<p>
Fusce congue dignissim urna. Vivamus eu metus lectus. Sed sagittis scelerisque condimentum. Morbi ut massa arcu. Morbi laoreet justo nec ligula rutrum porttitor. Ut accumsan, nisi id tincidunt
fringilla, velit urna hendrerit lacus, eu cursus diam libero in lorem. Sed non metus ultrices, ultrices est et, porttitor sapien. Suspendisse aliquam condimentum ex efficitur pretium. Nulla
facilisi. In hac habitasse platea dictumst. Cras eget risus eleifend, porttitor velit eget, pellentesque nibh. Aenean mattis aliquam tincidunt. Nullam quis ante quis enim egestas eleifend.
Pellentesque ut dictum nisl. Duis hendrerit augue vel tortor tincidunt auctor. Proin at sem metus.<br>
</p>
</div>
</div>--------------------------------------------------<br>
<!-- 5.0.0 -->
<div class="menu_header" id="menu_header80">
<a href="#" onclick="Effect.toggle('menu_block80', 'slide', {duration:0.5}); return false;">5.0.0</a>
<div class="menu_block" id="menu_block80" style="display:none">
<p>
Fusce congue dignissim urna. Vivamus eu metus lectus. Sed sagittis scelerisque condimentum. Morbi ut massa arcu. Morbi laoreet justo nec ligula rutrum porttitor. Ut accumsan, nisi id tincidunt
fringilla, velit urna hendrerit lacus, eu cursus diam libero in lorem. Sed non metus ultrices, ultrices est et, porttitor sapien. Suspendisse aliquam condimentum ex efficitur pretium. Nulla
facilisi. In hac habitasse platea dictumst. Cras eget risus eleifend, porttitor velit eget, pellentesque nibh. Aenean mattis aliquam tincidunt. Nullam quis ante quis enim egestas eleifend.
Pellentesque ut dictum nisl. Duis hendrerit augue vel tortor tincidunt auctor. Proin at sem metus.<br>
</p>
</div>
</div>--------------------------------------------------<br>
<div class="latest">
Nulla ac tempor nulla, et mattis erat.<br>
Morbi a placerat orci, et mollis erat.<br>
Curabitur maximus tellus in convallis iaculis.
</div>
<div class="footer">
© 2016 Lorem ipsum.
</div>
</div>
h1,h2,h3,h4,p,ul,ol,li,div,td,th,address,main,blockquote,nobr,b,i,span,a,input {
font-family: Monospace;
font-size: 11px;
line-height: 15px;
font-weight: 400;
font-style: normal;
color: #000;
}
body {
margin: 0;
padding: 0;
}
a:link,a:visited,a:hover,a:active {
text-decoration: none;
}
.latest {
color: red;
}
#scrollbox {
position: absolute;
overflow: hidden;
top: 40px;
left: 120px;
width: 340px;
background-color: #ff0;
z-index: 1;
padding: 0 16px 0 20px;
}
/* scrollbar styling */
.scrollgeneric {
line-height: 1px;
font-size: 1px;
position: absolute;
top: 0;
left: 0;
}
.vscrollerbase {
width: 4px;
background-color: #fff;
}
.vscrollerbar {
width: 4px;
background-color: #888;
}
.vscrollerbase {
visibility: visible !important;
}
/* ADD THIS CSS*/
.latest{
padding-bottom:100px;
}
.footer{
position:absolute;
bottom:0;
}
Also see: Tab Triggers