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="menu-container">
<ul class="vertical-nav">
<li>
<a href="#"><i data-feather="activity"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="box"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="cloud"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="database"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="inbox"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="package"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li>
<a href="#"><i data-feather="user"></i></a>
<div class="hover-menu">
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li class="menu-header">OTHER</li>
<li><a href="#">Menu Item</a></li>
</ul>
</div>
</li>
<li class="log-out">
<a title="Sign out" href="#"><i data-feather="log-out"></i></a>
</li>
</ul>
</div>
<div class="content">
<img src="https://placeimg.com/1280/300/architecture" class="header-image">
<h1 class="mb-0">Lorem ipsum dot sit amet</h1>
<p class="mt-0"><small>BY KEREM BEYAZIT</small></p>
<p>Lorem ipsum dolor sit amet consectetur adipiscing elit, rhoncus mollis mattis nulla est erat ligula lectus, urna laoreet habitant a quisque inceptos. Ridiculus commodo purus nec nisi aptent ullamcorper ac phasellus, fringilla etiam porttitor sem euismod
ultrices fermentum, maecenas dictum himenaeos lectus leo augue risus. Cubilia erat eleifend facilisi turpis aliquet class vehicula pulvinar magnis praesent, curabitur duis auctor ante leo torquent integer non urna, dis vulputate ligula ac accumsan congue
magna ultricies quis.
</p>
<table class="zui-table">
<thead>
<tr>
<th>PLAYER</th>
<th>POSITION</th>
<th>HEIGHT</th>
<th>BORN</th>
<th>SALARY</th>
</tr>
</thead>
<tbody>
<tr>
<td>DeMarcus Cousins</td>
<td>C</td>
<td>6'11"</td>
<td>08-13-1990</td>
<td>$4,917,000</td>
</tr>
<tr>
<td>Isaiah Thomas</td>
<td>PG</td>
<td>5'9"</td>
<td>02-07-1989</td>
<td>$473,604</td>
</tr>
<tr>
<td>Ben McLemore</td>
<td>SG</td>
<td>6'5"</td>
<td>02-11-1993</td>
<td>$2,895,960</td>
</tr>
<tr>
<td>Marcus Thornton</td>
<td>SG</td>
<td>6'4"</td>
<td>05-05-1987</td>
<td>$7,000,000</td>
</tr>
<tr>
<td>Jason Thompson</td>
<td>PF</td>
<td>6'11"</td>
<td>06-21-1986</td>
<td>$3,001,000</td>
</tr>
</tbody>
</table>
<p>Primis a consequat habitasse egestas commodo quisque ultricies luctus dictum nec diam, vel donec leo sed pulvinar dis felis auctor rutrum hendrerit, praesent rhoncus sem volutpat integer porttitor suspendisse nisl vestibulum quis. Torquent aliquam laoreet
ultricies sodales cubilia dictum semper morbi, vulputate sagittis justo imperdiet natoque cum sem, nisi etiam taciti tempor proin mollis habitasse. </p>
<p>Nisl facilisi posuere integer malesuada iaculis ornare duis, proin vehicula senectus primis sapien velit bibendum, curabitur sodales viverra montes et torquent. Laoreet phasellus rutrum est et hendrerit, curabitur ullamcorper odio vitae varius rhoncus,
nullam dignissim tellus quisque. Est velit justo interdum mauris suscipit ridiculus augue ligula class ornare, metus suspendisse semper ullamcorper himenaeos porttitor dictumst inceptos sodales rutrum, pellentesque etiam primis mattis taciti et magnis
nostra neque. </p>
<p>Primis a consequat habitasse egestas commodo quisque ultricies luctus dictum nec diam, vel donec leo sed pulvinar dis felis auctor rutrum hendrerit, praesent rhoncus sem volutpat integer porttitor suspendisse nisl vestibulum quis. Torquent aliquam laoreet
ultricies sodales cubilia dictum semper morbi, vulputate sagittis justo imperdiet natoque cum sem, nisi etiam taciti tempor proin mollis habitasse. </p>
<p>Fames vestibulum himenaeos ultricies hac porta dignissim praesent bibendum fermentum, phasellus risus platea suscipit luctus ut quis metus, ligula convallis litora eros ullamcorper vitae aliquam nullam. Habitant aliquam cubilia ultrices fermentum commodo
dictumst sed, mattis mi inceptos malesuada vivamus quam mauris rutrum, pharetra sapien justo habitasse sociis felis. </p>
<p>Nisl facilisi posuere integer malesuada iaculis ornare duis, proin vehicula senectus primis sapien velit bibendum, curabitur sodales viverra montes et torquent. Laoreet phasellus rutrum est et hendrerit, curabitur ullamcorper odio vitae varius rhoncus,
nullam dignissim tellus quisque. Est velit justo interdum mauris suscipit ridiculus augue ligula class ornare, metus suspendisse semper ullamcorper himenaeos porttitor dictumst inceptos sodales rutrum, pellentesque etiam primis mattis taciti et magnis
nostra neque. </p>
<p><strong>Primis a consequat habitasse egestas commodo quisque ultricies luctus dictum nec diam, vel donec leo sed pulvinar dis felis auctor rutrum hendrerit, praesent rhoncus sem volutpat integer porttitor suspendisse nisl vestibulum quis. Torquent aliquam laoreet
ultricies sodales cubilia dictum semper morbi, vulputate sagittis justo imperdiet natoque cum sem, nisi etiam taciti tempor proin mollis habitasse.</strong></p>
</div>
<footer>
<p>© 2018 YOU</p>
</footer>
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,600,700|Roboto+Condensed");
*,
::after,
::before {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100vh;
}
body {
webkit-text-size-adjust: 100%;
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-smoothing: antialiased;
-webkit-font-feature-settings: "kern" on, "liga" on, "calt" on, "onum", "pnum";
-webkit-font-smoothing: subpixel-antialiased;
text-shadow: rgba(0, 0, 0, 0.01) 0 0 1px;
background: #fff;
font-family: "Roboto", sans-serif;
font-size: 14px;
margin: 0;
font-weight: 400;
padding: 0;
}
a {
color: #1e85c9;
}
.vertical-nav {
position: fixed;
background:white;
box-shadow: 0 0 40px #00000021;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
margin: 0;
padding: 0;
height: 100vh;
width: 70px;
}
.vertical-nav li {
list-style: none;
display: block;
width: 100%;
border-bottom: solid 1px #f2f5ff;
text-align: center;
position: relative;
flex-grow: 1;
align-items: stretch;
display: flex;
}
.vertical-nav li:last-child {
border: none;
}
.vertical-nav li a {
width: 100%;
display: flex;
align-items: center;
flex-flow: column;
justify-content: center;
transition: all 0.2s ease;
}
.vertical-nav li:hover > a {
background: #fafafa;
transition: all 0.2s ease;
}
.vertical-nav li:hover > a .feather {
transform: scale(1.1);
transition: all 0.2s ease;
}
.vertical-nav li:hover > .hover-menu,
.vertical-nav li:focus-within > .hover-menu {
visibility: visible;
opacity: 1;
-webkit-animation: slide-down 0.2s ease-out;
-moz-animation: slide-down 0.2s ease-out;
transition: all 0.5s ease;
display: block;
}
.vertical-nav li .hover-menu {
background: white;
visibility: hidden;
transition: all 0.5s ease;
opacity: 0;
display: none;
position: absolute;
left: 70px;
min-width: 200px;
margin: 0;
padding: 0;
top: 0;
box-shadow: 0 0 40px #00000021;
}
.vertical-nav li .hover-menu:after {
right: 100%;
top: 20%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(255, 255, 255, 0);
border-right-color: #ffffff;
border-width: 10px;
margin-top: -10px;
}
.vertical-nav li .hover-menu ul {
margin: 0;
padding: 0;
}
.vertical-nav li .hover-menu ul li {
list-style: none;
display: block;
width: 100%;
text-align: center;
}
.vertical-nav li .hover-menu ul li a {
width: 100%;
display: block !important;
text-decoration: none;
padding: 15px 20px;
text-align: left;
height: auto !important;
font-weight: 400;
}
.vertical-nav li .hover-menu ul li a:hover {
background: #fafafa;
transition: 0.3s ease;
}
.menu-header {
font-family: "Roboto Condensed", sans-serif;
color: #929292;
font-size: 13px;
text-align: left !important;
padding: 12px 20px 5px 20px;
font-weight: 600;
border-bottom: none !important;
}
.log-out a {
background: #1e85c9;
color: white;
}
.log-out a:hover {
color: #1e85c9;
background: white;
}
@-webkit-keyframes slide-down {
0% {
opacity: 0;
-webkit-transform: translateY(-5%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
0{
opacity:0;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes slide-down {
0% {
opacity: 0;
-moz-transform: translateY(-5%);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
.content {
padding: 40px;
color: #464646;
width:1170px;
margin:0 auto;
}
h1,
h2 {
color:#343535;
font-weight: 400;
}
p,
.content li {
color: #949494;
line-height: 29px;
font-size: 16px;
font-weight: 300;
}
.header-image {
height: 300px;
width: 100%;
object-fit: cover;
}
.mt-0{
margin-top:0;
}
.mb-0{
margin-bottom:0;
}
/* Zui table (modified) - https://jsfiddle.net/zinoui/dB93J/ */
.zui-table {
border: solid 1px #ddeeee;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
box-shadow: 0 0 40px #00000021;
margin: 50px 0;
}
.zui-table thead th {
background-color: #fff;
border: solid 1px #dee;
color: #343535;
border: solid 1px #f5f9f9;
padding: 20px;
text-align: left;
}
.zui-table tbody td {
border: solid 1px #edf1f1;
color: #949494;
font-size:16px;
padding: 20px;
}
footer{
padding:20px 0;
text-align:center;
}
footer p{
color:gray;
font-size:12px;
}
// Feather Icons
feather.replace()
Also see: Tab Triggers