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

              
                <!-- Note: Not tested on mobile -->

<h3 style="text-align: center; color: #ffffff;">Hover over image to see scrolling effect</h3>

<div class="portfolio">
  <div class="img01">
    <img src="https://drive.google.com/uc?id=1oQiXjGoTTmZ8NJU0tUkEALZpBZ-bwy-I" width="500px">
  </div>
</div>
              
            
!

CSS

              
                /* The monitor image is a transparent .png (drag image to see) with the area under the screen textured with the same pattern as the body. The textured area wouldn't be necessary if a laptop image was used instead! I just liked this look more */

body {
  background-image: url("https://drive.google.com/uc?id=1_3isr5U2ElaGk6JSbZwzwFuQpGozompv");
}

.portfolio {
  margin: 50px auto;
  overflow: hidden;
}

.img01 {
  margin: 0 auto;
  width: 500px;
}

.img01 img {
  background-image: 
    url("https://drive.google.com/uc?id=18FvMIXAMPMkv-CIR1sCEgqfNvRIgk6Li"), 
    url("https://drive.google.com/uc?id=1KmTXurc0-C5i1pFQQwvHNZ7T1lyhM7nB");
  background-size: 95%;
  background-position: 40% -10%;
  background-repeat: no-repeat;
  -webkit-transition: background-position 3.5s ease;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 500px;
  height: 500px;
}

.img01 img:hover {
  background-position: 40% 132%;
  position: relative;
}
              
            
!

JS

              
                
              
            
!
999px

Console