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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                
<html>
  <head>
    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
    <title>Orpel</title>
    <style type="text/css">
      body{background-image:url(noir.jpg)}

      #slideshow {  
    position: relative;  
    width: 640px;  
    height: 310px;  
    padding: 15px;  
    margin: 0 auto 2em;  
    border: 1px solid #ddd;  
    background: #FFF;  
      
    background: linear-gradient(#FFF, #FFF 20%, #EEE 80%, #DDD);  
    border-radius: 2px 2px 2px 2px;  
    box-shadow: 0 0 3px rgba(0,0,0, 0.2);  
}  
   
#slideshow:before,  
#slideshow:after {  
    position: absolute;  
    bottom:16px;  
    z-index: -10;  
    width: 50%;  
    height: 20px;  
    content: " ";  
    background: rgba(0,0,0,0.1);  
    border-radius: 50%;  
    box-shadow: 0 0 3px rgba(0,0,0, 0.4), 0 20px 10px rgba(0,0,0, 0.7);  
}  
#slideshow:before {  
    left:0;  
    transform: rotate(-4deg);  
}  
#slideshow:after {  
    right:0;  
    transform: rotate(4deg);  
}   
#slideshow .container {  
    position:relative;  
    width: 640px;  
    height: 310px;  
    overflow: hidden;  
}  
        
      #slideshow .container:after {  
    position:absolute;  
    bottom: 0; left:0;  
    content: " ";  
    width: 100%;  
    height: 1px;  
    background: #999;  
}  

#slideshow .slider {  
    position: absolute;  
    left:0; top:0;  
    width: 400%;  
            height: 310px;  
}  
   
#slideshow figure {  
    position:relative;  
    display:inline-block;  
    padding:0; margin:0;  
}  
 
#slideshow figure:after {  
    position: absolute;  
    display:block;  
    content: " ";  
    top:0; left:0;  
    width: 100%; height: 100%;  
    box-shadow: 0 0 65px rgba(0,0,0, 0.5) inset;  
}  
#slideshow figcaption {  
    position:absolute;  
    left:0; right:0; bottom: 5px;  
    padding: 20px;  
    margin:0;  
    border-top: 1px solid rgb(225,225,225);  
    text-align:center;  
    letter-spacing: 0.05em;  
    word-spacing: 0.05em;  
    font-family: Georgia, Times, serif;  
    background: #fff;  
    background: rgba(255,255,255,0.7);  
    color: #555;  
    text-shadow: -1px -1px 0 rgba(255,255,255,0.3);   
}
 @-webkit-keyframes slider {
0%, 20%, 100% { left: 0 }
 25%, 45% { left: -100% }
 50%, 70% { left: -200% }
 75%, 95% { left: -300% }
 }
 @-moz-keyframes slider {
 0%, 20%, 100% { left: 0 }
 25%, 45% { left: -100% }
 50%, 70% { left: -200% }
 75%, 95% { left: -300% }
 }

@-o-keyframes slider {
 0%, 20%, 100% { left: 0 }
 25%, 45% { left: -100% }
 50%, 70% { left: -200% }
 75%, 95% { left: -300% }
 }
 @keyframes slider {
 0%, 20%, 100% { left: 0 }
 25%, 45% { left: -100% }
 50%, 70% { left: -200% }
 75%, 95% { left: -300% }
 }

#slideshow .slider {   
animation-name: slider; 
animation-duration:32s;
animation-iteration-count:infinite;
}  

#timeline {  
    position: absolute;  
    background: #999;  
    bottom: 15px;  
    left: 15px;  
    height: 1px;  
    background: rgb(214,98,13);  
    background: rgba(214,98,13,.8);  
    width: 0;  
  
    animation-name: timeliner;
    animation-duration:32s;
    animation-iteration-count:infinite;
}
      @keyframes timeliner {  
    0%, 25%, 50%, 75%, 100% { width: 0;     }  
    20%, 45%, 70%, 90%      { width: 640px; }  
}  
.play_commands {  
    /* positionnement en haut à droite */   
    position: absolute;  
    top: 25px; right: 25px;  
    z-index: 10;    
    width: 22px;  
    height: 22px;  
    text-indent: -9999px;  
    border:0 none;  
    /* placez l'opacité à 1 si vous souhaitez voir les commandes */  
    opacity: 1;  
    /* préparation de transition sur opacicty et right */  
    transition: opacity 1s, right 1s;  
}  
/* on décale play légèrement sur la gauche */  
.play { right: 55px; cursor: default; }  
   
/* création de l'icône pause avec 2 pseudos éléments */  
.pause:after,  
.pause:before {  
    position: absolute;  
    display: block;  
    content: " ";  
    top:0;  
    width:38%;  
    height: 22px;  
    background: #fff;  
    background: rgba(255,255,255,0.5);  
}  
.pause:after { right:0; }  
.pause:before { left:0; }  
   
/* création de l'icône play avec des bordures */  
.play {  
    width: 1px;   
    height: 1px;   
    /* les transparentes forment la flèche */  
    border-top: 10px solid transparent;  
    border-bottom: 10px solid transparent;  
    border-left: 20px solid #fff;   
    border-left: 20px solid rgba(255,255,255,0.5);   
    /* renseignez 1 pour voir l'icône de suite */  
    opacity: 1;  
}  
   
/* apparition du bouton pause au survole */  
/* apparition des boutons au focus */  
#slideshow:hover .pause,  
.play_commands:focus {  
    opacity: 1;  
    outline: none;  
}  
/* stopper les animation */  
.sl_command:target ~ #slideshow .slider,  
.sl_command:target ~ #slideshow figcaption,  
.sl_command:target ~ #slideshow #timeline,  
.sl_command:target ~ #slideshow .dots_commands li:first-child a:after {  
    animation-play-state: paused;  
}  
   
/* redémarrer les animations */  
#sl_play:target ~ #slideshow .slider,  
#sl_play:target ~ #slideshow figcaption,  
#sl_play:target ~ #slideshow #timeline,  
#sl_play:target ~ #slideshow .dots_commands li:first-child a:after {  
    animation-play-state: running;  
}  
   
/* switch entre les boutons */  
.sl_command:target ~ #slideshow .pause      { opacity:0; }  
#sl_play:target ~ #slideshow:hover .pause,  
#sl_play:target ~ #slideshow .pause:focus   { opacity:1; }  
.sl_command:target ~ #slideshow .play       { opacity:1; right: 25px; cursor: pointer; }  
#sl_play:target ~ #slideshow .play          { opacity:0; right: 55px; cursor: default; 

.dots_commands  {  
    padding:0;  
    margin:40px 0 0;  
    text-align: center;  
}  
.dots_commands li {  
    display: inline;  
    padding:0; margin:0;  
}  
.dots_commands a {  
    position: relative;  
    display: inline-block;  
    height:14px; width: 14px;  
    margin: 0 6px;  
    text-indent: -9999px;  
    background: #fff;  
   
    border-radius: 50%;  
    box-shadow: 0 1px 2px rgba(0,0,0,0.55) inset;  
          
}    
.dots_commands a:focus {   
    outline: none;  
    background: orange;  
}  
.dots_commands li:first-child a { z-index: 25; }  

       
.dots_commands li:first-child a:after,  
.dots_commands li:first-child a:before {  
    position: absolute;  
    top: 0; left: 0;  
    content: " ";  
    width: 14px; height: 14px;  
    background: #bd9b83;  
    z-index:20;  
  
    border-radius: 50%;  
    box-shadow: 0 1px 2px rgba(0,0,0,0.55) inset;  
}    
.dots_commands li:first-child a:after {  
    animation: dotser 32s infinite;  
}  
.dots_commands li:first-child a:before { display:none; }  
     
@keyframes dotser {  
    0%, 100%    { opacity: 1; left: 0;      }  
         
    20%         { opacity: 1; left: 0;      }  
    22%         { opacity: 0; left: 0;      }  
    23%         { opacity: 0; left: 18px;   }  
    25%         { opacity: 1; left: 18px;   }  
         
    45%         { opacity: 1; left: 18px;   }  
    47%         { opacity: 0; left: 18px;   }  
    48%         { opacity: 0; left: 36px;   }  
    50%         { opacity: 1; left: 36px;   }  
         
    70%         { opacity: 1; left: 36px;   }  
    72%         { opacity: 0; left: 36px;   }  
    73%         { opacity: 0; left: 54px;   }  
    75%         { opacity: 1; left: 54px;   }  
         
    95%         { opacity: 1; left: 54px;   }  
    97%         { opacity: 0; left: 54px;   }  
    98%         { opacity: 0; left: 0;  }  
}  

</style></head>
  <body>
    
    <span id="sl_play" class="sl_command"></span> <span id="sl_pause" class="sl_command"></span>
    <span id="sl_i1" class="sl_command sl_i"></span> <span id="sl_i2" class="sl_command sl_i"></span>
    <span id="sl_i3" class="sl_command sl_i"></span> <span id="sl_i4" class="sl_command sl_i"></span>
    <section id="slideshow"> <a class="play_commands pause" href="#sl_pause" title="Maintain paused">Pause</a>
      <a class="play_commands play" href="#sl_play" title="Play the animation">Play</a>
      <div class="container">
        <div class="slider">
          <figure> <img src="image1test.jpg" alt="" height="310" width="640"> <figcaption>The
              mirror of soul</figcaption> </figure>
          <!-- 
            -->
          <figure> <img src="image2test.jpg" alt="" height="310" width="640"> <figcaption>Let's
              cross that bridge when we come to it</figcaption> </figure>
          <!-- 
           -->
          <figure> <img src="image3test.jpg" alt="" height="310" width="640"> <figcaption>Sushi<em>(do)</em>
              time</figcaption> </figure>
          <!-- 
            -->
          <figure> <img src="image4test.jpg" alt="" height="310" width="640"> <figcaption>Waking
              Life</figcaption> </figure>
        </div>
      </div>
      <span id="timeline">
        <ul class="dots_commands">
          <!-- 
    -->
          <li><a title="Afficher la slide 1" href="#sl_i1">Slide 1</a></li>
          <!-- 
    -->
          <li><a title="Afficher la slide 2" href="#sl_i2">Slide 2</a></li>
          <!-- 
    -->
          <li><a title="Afficher la slide 3" href="#sl_i3">Slide 3</a></li>
          <!-- 
    -->
          <li><a title="Afficher la slide 4" href="#sl_i4">Slide 4</a></li>
        </ul>
      </span> </section>
    
  </body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px
If a groundhog inspects their Web Component, do they see their Shadow DOM?

Console