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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <div class="sample">
  <img src="https://dummyimage.com/150x100/000/fff"><br>
  元の画像
</div>
<div class="sample">
  <div class="circle"></div>
  mixinで横長指定
</div>

<div class="sample">
  <div class="circle-without-specification window-for-more-horizontal-image"></div>
  セレクタで横長指定
</div>

<div class="sample">
  <div class="circle-without-specification"></div>
  横長・縦長指定なし
</div>

<div class="sample">
  <div class="circle-without-frame"></div>
  枠無し
</div>

<div class="sample">
  <div class="circle-without-image"></div>
  画像無し
</div>

<div class="sample">
  <div class="square"></div>
  正方形
</div>

<div class="sample">
  <div class="square-with-rounded-corners"></div>
  正方形(角丸)
</div>

<div class="sample">
  <div class="rectangle"></div>
  長方形
</div>

<div class="sample">
  <div class="rectangle-with-rounded-corners"></div>
  長方形(角丸)
</div>

              
            
!

CSS

              
                /** 利用例 */
$image_url: "https://dummyimage.com/150x100/000/fff";
$border-color: #FD7412;
.circle {
  @include circle-window(20vw, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

.circle-without-specification {
  @include circle-window(20vw, 1vw, solid, $border-color);
  background-image: url($image_url);
}

.circle-without-frame {
  @include circle-window(20vw);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

.circle-without-image {
  @include circle-window(20vw, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
}

.square {
  @include square-window(20vw, 0, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

.square-with-rounded-corners {
  @include square-window(20vw, 20%, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

.rectangle {
  @include rectangle-window(30vw, 20vw, 0, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

.rectangle-with-rounded-corners {
  @include rectangle-window(30vw, 20vw, 20%, 1vw, solid, $border-color);
  @include window-for-more-horizontal-image();
  background-image: url($image_url);
}

/** 見やすさ用の調整パート */
.sample {
  float: left;
  border: 1px solid gray;
  margin: 1%;
  padding: 1%;
  text-align: center;
  div {
    margin: 0 auto;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console