Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

HTML

              
                <h3>上から左から50px</h3>
<div class="background top-left50"></div>
<h3>top 左から50%</h3>
<div class="background top-left50p"></div>
<h3>top 左から100%</h3>
<div class="background top-left100p"></div>
<h3>top 右から90%</h3>
<div class="background top-right100p"></div>
<h3>top 上から50% 左から50%</h3>
<div class="background p50p"></div>
<h3>top 上から50px 左から120px</h3>
<div class="background top50-left120"></div>
<h3>top 上から50px 右から120px</h3>
<div class="background top50-right120"></div>
              
            
!

CSS

              
                .background {
  margin-bottom: 10px;
  width: 300px;
  height: 120px;
  background-color: yellow;
  background-image: url("https://jajaaan.co.jp/wp-content/uploads/2020/04/background-position1.png");
  background-repeat: no-repeat;
  background-size: 100px;
}

.background.top-left50 {
  background-position: 50px;
}

.background.top-left50p {
  background-position: top left 50%;
}

.background.top-left100p {
  background-position: top left 100%;
}

.background.top-right100p {
  background-position: top right 90%;
}

.background.p50p {
  background-position: 50%;
}

.background.top50-left120 {
  background-position: top 50px left 120px;
}

.background.top50-right120 {
  background-position: top 50px right 120px;
}

              
            
!

JS

              
                
              
            
!
999px

Console