Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

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.

Behavior

Auto Save

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="double-1">1. Hover me </div>
<div class="double-2">2. Hover me </div>
<div class="double-3">3. Hover me </div>
<div class="double-4">4. Hover me </div>
<div class="double-5">5. Hover me </div>
<div class="double-6">6. Hover me </div>
<div class="double-7">7. Hover me </div>

              
            
!

CSS

              
                 .double-1 {
   padding-bottom:8px;
   background:
   	linear-gradient(currentColor 0 0) left  0 bottom 4px,
   	linear-gradient(currentColor 0 0) right 0 bottom 4px;
   background-size:50% 3px;
   background-repeat:no-repeat;
   transition:0.3s linear,background-position 0.3s 0.3s;
 }
.double-1:hover {
 	background-position: left 0 bottom 6px,right 0 bottom 0; 
 	background-size: 100% 3px;
 	transition:0.3s linear,background-size 0.3s 0.3s;
 }

.double-2 {
   padding-bottom:8px;
   background:
   	linear-gradient(currentColor 0 0) left  0 bottom 4px,
   	linear-gradient(currentColor 0 0) right 0 bottom 4px;
   background-size:50% 3px;
   background-repeat:no-repeat;
 	 transition:0.3s linear,background-size 0.3s 0.3s;
 }
.double-2:hover {
 	background-position: left 0 bottom 6px,right 0 bottom 0; 
 	background-size: 100% 3px;
 }

.double-3 {
   padding-bottom:8px;
   background:
   	linear-gradient(currentColor 0 0) left  -100% bottom 0,
   	linear-gradient(currentColor 0 0) right -100% bottom 0;
   background-size:40% 3px;
   background-repeat:no-repeat;
  transition:0.5s;
 }
 .double-3:hover {
 	background-position: left 10% bottom 0,right 10% bottom 0; 
 }

.double-4 {
   padding-bottom:8px;
   background:
   	linear-gradient(currentColor 0 0) bottom,
   	linear-gradient(currentColor 0 0) bottom;
   background-size:15px 3px;
   background-repeat:no-repeat;
   transition:0.3s linear,background-size 0.3s 0.2s linear;
 }
.double-4:hover {
 	background-size:40% 3px;
 	background-position: left 10% bottom 0,right 10% bottom 0; 
 }

.double-5 {
   padding-bottom:8px;
   background:
   	linear-gradient( 90deg, #0000 calc(50% - 10px),currentColor 0) bottom 4px center,
   	linear-gradient(-90deg, #0000 calc(50% - 10px),currentColor 0) bottom 4px center;
   background-size:15px 3px;
   background-repeat:no-repeat;
   transition:0.3s linear,background-size 0.3s 0.3s linear;
 }
 .double-5:hover {
 	background-position: bottom 6px center, bottom 0 center; 
 	background-size: 100% 3px;
 }
 
.double-6 {
   padding-bottom:8px;
   background:
   	linear-gradient(currentColor 0 0) bottom 6px center,
   	linear-gradient(currentColor 0 0) bottom left,
   	linear-gradient(currentColor 0 0) bottom right;
   background-size:0 3px;
   background-repeat:no-repeat;
   transition:0.5s linear,background-position 0s 0.5s;
 }
.double-6:hover {
 	background-size:100% 3px,50% 3px,50% 3px;
 	background-position:bottom,bottom 6px left 0,bottom 6px right 0; 
 }
 
.double-7 {
   padding-bottom:8px;
   background:
   	linear-gradient( 90deg, #0000 calc(50% + 10px),currentColor 0) bottom ,
   	linear-gradient(-90deg, #0000 calc(50% + 10px),currentColor 0) bottom ;
   background-size:0px 3px;
   background-repeat:no-repeat;
  transition:0.5s;
 }
.double-7:hover { 
 	background-size: 90% 3px;
 }

/**/
[class] {
  display:inline-block;
  vertical-align: middle;
  font-size:40px;
  font-family:sans-serif;
  margin:25px;
  cursor:pointer;
}
body > [class]:nth-child(odd) {
  color:darkblue;
}
body {
  text-align:center;
}
              
            
!

JS

              
                
              
            
!
999px

Console