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

              
                <p>scaleX(水平方向) / 拡大</p>
<div class="container">
  <img class="scaleX" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>
<p>scaleX(水平方向) / 縮小</p>
<div class="container">
  <img class="scaleX_1" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>
<p>scaleX(水平方向)に負の値を指定</p>
<div class="container">
  <img class="scale-X" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>

<p>scaleY(垂直方向)</p>
<div class="container">
  <img class="scaleY" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>
<p>scaleY(垂直方向)に負の値を指定</p>
<div class="container">
  <img class="scale-Y" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>

<p>scale(水平・垂直方向)</p>
<div class="container">
  <img class="scale" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>

<p>scaleZ(奥行方向)</p>
<div class="container">
  <img class="scaleZ" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>

<p>scale3d(奥行方向) </p>
<div class="container container3d">
  <img class="scale3d" src="https://spica-weblog.github.io/codepen-lesson/img/sample_img (2).jpg" alt="">
</div>

              
            
!

CSS

              
                /* base */
.container {
  width: 300px;
  margin: 0 30px 40px;
}
p {
  font-weight: bold;
}
img {
  max-width: 100%;
  -webkit-transition: all .8s ease;
  transition: all .8s ease;
}
.container {
  cursor: pointer;
}

/* X軸方向に拡大 */
.container:hover .scaleX {
  -webkit-transform: scale(1.2);
          transform: scale(1.2);
}
/* X軸方向に縮小 */
.container:hover .scaleX_1 {
  -webkit-transform: scale(0.8);
          transform: scale(0.8);
}
/* X軸方向に負の値を指定すると回転しているように見える */
.container:hover .scale-X {
  -webkit-transform: scale(-1.2);
          transform: scale(-1.2);
}
/* Y軸方向に拡大 */
.container:hover .scaleY {
  -webkit-transform: scaleY(1.2);
          transform: scaleY(1.2);
}
/* Y軸方向に負の値を指定すると回転しているように見える */
.container:hover .scale-Y {
  -webkit-transform: scaleY(-1.2);
          transform: scaleY(-1.2);
}
/* 水平・垂直方向 */
.container:hover .scale {
  -webkit-transform: scale(1.2, 0.8);
          transform: scale(1.2, 0.8);
}
/* Z軸方向のみ指定しても変化はない */
.container:hover .scaleZ {
  -webkit-transform: scaleZ(1.2);
          transform: scaleZ(1.2);
}
/* scale3d */
.container3d {
  -webkit-perspective: 500px;
          perspective: 500px; /* 親要素にユーザーの視点 */
}
.scale3d {
  -webkit-transform: rotateX(60deg);
          transform: rotateX(60deg); /* 初期状態での指定が必要 */
}
.container3d:hover .scale3d {
  -webkit-transform: scale3d(1.5, 1.5, -2);
          transform: scale3d(1.5, 1.5, -2);
}

              
            
!

JS

              
                
              
            
!
999px

Console