Pen Settings



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


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


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.


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.


                <div class="overlay-image">
  <img src="" alt="Overlay Image">
  <div class="hover-image">
    <h3>Lorem ipsum sic amet.</h3>
    <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>


                .overlay-image {
  position: relative; /* Important pour positionner le contenu par dessus, relatif à l'élément */
  display: inline-block; /* Prendra la forme de son contenu */

.overlay-image img {
  vertical-align: middle; /* Ou display: block, pour enlever l'espace blanc */

.overlay-image .hover-image {
  /* Positionnement du contenu hover */
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  /* Effets de transition */
  opacity: 0; /* On cache l'élément via son opacité */
  transition: opacity 0.25s ease-in-out; /* Effet de transition sur le hover */
  /* Style du contenu hover */
  background-color: rgba(255,0,0,0.6); /* Couleur par défaut */
  color: white;
  padding: 30px;
  /* Centrer le contenu */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;

.overlay-image:hover .hover-image {
  opacity: 1; /* Lors du hover, on remet l'opacité à 1 */