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="section">

  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=10YpX23wkcjRflfloUt7tqLeumpias42N" width="800">
    <p>美しい山の景色</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=172pIgbAQZlAWJ18GFLXM9MoWbbi8XfxU" width="800">
    <p>森の中にある、静かな湖</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=10mqA1CfPi8N9_McRCe0bOGR_jUHzPEch" width="800">
    <p>自転車を止めてお買い物へ</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=1EnQP6JWlE02lzrcUi0d5zoMihOsWkruG" width="300">
    <p>空から見た夜の街の景色</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=1gxu3jZSNU719vxtVA4KV3zhnUO4QR4ve" width="800">
    <p>さむそうな岩山</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=1bW4fKXZFM_wPHSSf6EewRYX-hV5iNhvu" width="800">
    <p>列車が到着した駅のホーム</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=1T0HWZM16tQRdHcA6Vspor7wa7K9Zh8cQ" width="800">
    <p>きれいな青空の町並み</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=1WRQVpgmW1s5YrzB0iQrMYfbU4MvNiyvH" width="300">
    <p>朝方の湖の様子</p>
  </div>
  <div class="container lazyload" data-bg="https://drive.google.com/uc?export=view&id=15UqOXsvuKpLX6a9K9-tW8TLqgotz0I6d" width="300">
    <p>ビルと空</p>
  </div>

</div>
              
            
!

CSS

              
                html,
body {
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}
.section {
  max-width: 1240px;
  height: 200vh;
  margin: 0 auto;
  padding: 20px 20px;
}

p {
  display: block;
  font-size: clamp(0.875rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  margin: 0;
}

.container {
  margin: 3rem 0;
  padding: 20%;
  text-align: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.container img {
  width: 100%;
  height: auto;
  vertical-align: top;
}

              
            
!

JS

              
                
              
            
!
999px

Console