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="row"><div class="name">linear: </div><div class="box linear"></div></div>
<div class="row"><div class="name">ease: </div><div class="box ease"></div></div>
<div class="row"><div class="name">ease-in: </div><div class="box ease-in"></div></div>
<div class="row"><div class="name">ease-in-out: </div><div class="box ease-in-out"></div></div>

<div class="row"><div class="name">easeInQuad: </div><div class="box easeInQuad"></div></div>
<div class="row"><div class="name">easeInQuad: </div><div class="box easeInCubic"></div></div>
<div class="row"><div class="name">easeInQuart: </div><div class="box easeInQuart"></div></div>
<div class="row"><div class="name">easeInQuint: </div><div class="box easeInQuint"></div></div>
<div class="row"><div class="name">easeInSine: </div><div class="box easeInSine"></div></div>
<div class="row"><div class="name">easeInExpo: </div><div class="box easeInExpo"></div></div>
<div class="row"><div class="name">easeInCirc: </div><div class="box easeInCirc"></div></div>
<div class="row"><div class="name">easeInBack: </div><div class="box easeInBack"></div></div>

<div class="row"><div class="name">easeOutQuad: </div><div class="box easeOutQuad"></div></div>
<div class="row"><div class="name">easeOutCubic: </div><div class="box easeOutCubic"></div></div>
<div class="row"><div class="name">easeOutQuart: </div><div class="box easeOutQuart"></div></div>
<div class="row"><div class="name">easeOutQuint: </div><div class="box easeOutQuint"></div></div></div>
<div class="row"><div class="name">easeOutSine: </div><div class="box easeOutSine"></div></div>
<div class="row"><div class="name">easeOutExpo: </div><div class="box easeOutExpo"></div></div>
<div class="row"><div class="name">easeOutCirc: </div><div class="box easeOutCirc"></div></div>
<div class="row"><div class="name">easeOutBack: </div><div class="box easeOutBack"></div></div>

<div class="row"><div class="name">easeInOutQuad: </div><div class="box easeInOutQuad"></div></div>
<div class="row"><div class="name">easeInOutCubic: </div><div class="box easeInOutCubic"></div></div>
<div class="row"><div class="name">easeInOutQuart: </div><div class="box easeInOutQuart"></div></div>
<div class="row"><div class="name">easeInOutQuint: </div><div class="box easeInOutQuint"></div></div>
<div class="row"><div class="name">easeInOutSine: </div><div class="box easeInOutSine"></div></div>
<div class="row"><div class="name">easeInOutExpo: </div><div class="box easeInOutExpo"></div></div>
<div class="row"><div class="name">easeInOutCirc: </div><div class="box easeInOutCirc"></div></div>
<div class="row"><div class="name">easeInOutBack: </div><div class="box easeInOutBack"></div></div>
              
            
!

CSS

              
                // イージング値の取得
@function returnEaseTypeToCubicBezier($type) {
    $easingValue: "";

    @if $type == "linear" {
        $easingValue: "0.250, 0.250, 0.750, 0.750";
    }
    @else if $type ==  "ease" {
        $easingValue: "0.250, 0.100, 0.250, 1.000";
    }
    @else if $type ==  "ease-in" {
        $easingValue: "0.420, 0.000, 1.000, 1.000";
    }
    @else if $type ==  "ease-out" {
        $easingValue: "0.000, 0.000, 0.580, 1.000";
    }
    @else if $type ==  "ease-in-out" {
        $easingValue: "0.420, 0.000, 0.580, 1.000";
    }

    @else if $type ==  "easeInQuad" {
        $easingValue: "0.550, 0.085, 0.680, 0.530";
    }
    @else if $type ==  "easeInCubic" {
        $easingValue: "0.550, 0.055, 0.675, 0.190";
    }
    @else if $type ==  "easeInQuart" {
        $easingValue: "0.895, 0.030, 0.685, 0.220";
    }
    @else if $type ==  "easeInQuint" {
        $easingValue: "0.755, 0.050, 0.855, 0.060";
    }
    @else if $type ==  "easeInSine" {
        $easingValue: "0.470, 0.000, 0.745, 0.715";
    }
    @else if $type ==  "easeInExpo" {
        $easingValue: "0.950, 0.050, 0.795, 0.035";
    }
    @else if $type ==  "easeInCirc" {
        $easingValue: "0.600, 0.040, 0.980, 0.335";
    }
    @else if $type ==  "easeInBack" {
        $easingValue: "0.600, -0.280, 0.735, 0.045";
    }


    @else if $type ==  "easeOutQuad" {
        $easingValue: "0.250, 0.460, 0.450, 0.940";
    }
    @else if $type ==  "easeOutCubic" {
        $easingValue: "0.215, 0.610, 0.355, 1.000";
    }
    @else if $type ==  "easeOutQuart" {
        $easingValue: "0.165, 0.840, 0.440, 1.000";
    }
    @else if $type ==  "easeOutQuint" {
        $easingValue: "0.230, 1.000, 0.320, 1.000";
    }
    @else if $type ==  "easeOutSine" {
        $easingValue: "0.390, 0.575, 0.565, 1.000";
    }
    @else if $type ==  "easeOutExpo" {
        $easingValue: "0.190, 1.000, 0.220, 1.000";
    }
    @else if $type ==  "easeOutCirc" {
        $easingValue: "0.075, 0.820, 0.165, 1.000";
    }
    @else if $type ==  "easeOutBack" {
        $easingValue: "0.175, 0.885, 0.320, 1.275";
    }


    @else if $type ==  "easeInOutQuad" {
        $easingValue: "0.455, 0.030, 0.515, 0.955";
    }
    @else if $type ==  "easeInOutCubic" {
        $easingValue: "0.645, 0.045, 0.355, 1.000";
    }
    @else if $type ==  "easeInOutQuart" {
        $easingValue: "0.770, 0.000, 0.175, 1.000";
    }
    @else if $type ==  "easeInOutQuint" {
        $easingValue: "0.860, 0.000, 0.070, 1.000";
    }
    @else if $type ==  "easeInOutSine" {
        $easingValue: "0.445, 0.050, 0.550, 0.950";
    }
    @else if $type ==  "easeInOutExpo" {
        $easingValue: "1.000, 0.000, 0.000, 1.000";
    }
    @else if $type ==  "easeInOutCirc" {
        $easingValue: "0.785, 0.135, 0.150, 0.860";
    }
    @else if $type ==  "easeInOutBack" {
        $easingValue: "0.680, -0.550, 0.265, 1.550";
    }

    @return unquote($easingValue);
}

// cubic-bezierの呼び出し
@function ease($type) {
    @return unquote("cubic-bezier(#{returnEaseTypeToCubicBezier($type)})");
}


.row {
  margin: 0 0 5px;
}
.name {
  display: inline-block;
  width: 10em;
}
.box {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #000;
  margin: 0;
  vertical-align: middle;
}

.linear      { animation: translate 2s ease('linear') infinite; }
.ease        { animation: translate 2s ease('ease') infinite; }
.ease-in     { animation: translate 2s ease('ease-in') infinite; }
.ease-in-out { animation: translate 2s ease('ease-in-out') infinite; }
.easeInQuad  { animation: translate 2s ease('easeInQuad') infinite; }
.easeInCubic { animation: translate 2s ease('easeInCubic') infinite; }
.easeInQuart { animation: translate 2s ease('easeInQuart') infinite; }
.easeInQuint { animation: translate 2s ease('easeInQuint') infinite; }
.easeInSine  { animation: translate 2s ease('easeInSine') infinite; }
.easeInExpo  { animation: translate 2s ease('easeInExpo') infinite; }
.easeInCirc  { animation: translate 2s ease('easeInCirc') infinite; }
.easeInBack  { animation: translate 2s ease('easeInBack') infinite; }
.easeOutQuad  { animation: translate 2s ease('easeOutQuad') infinite; }
.easeOutCubic { animation: translate 2s ease('easeOutCubic') infinite; }
.easeOutQuart { animation: translate 2s ease('easeOutQuart') infinite; }
.easeOutQuint { animation: translate 2s ease('easeOutQuint') infinite; }
.easeOutSine  { animation: translate 2s ease('easeOutSine') infinite; }
.easeOutExpo  { animation: translate 2s ease('easeOutExpo') infinite; }
.easeOutCirc  { animation: translate 2s ease('easeOutCirc') infinite; }
.easeOutBack  { animation: translate 2s ease('easeOutBack') infinite; }
.easeInOutQuad  { animation: translate 2s ease('easeInOutQuad') infinite; }
.easeInOutCubic { animation: translate 2s ease('easeInOutCubic') infinite; }
.easeInOutQuart { animation: translate 2s ease('easeInOutQuart') infinite; }
.easeInOutQuint { animation: translate 2s ease('easeInOutQuint') infinite; }
.easeInOutSine  { animation: translate 2s ease('easeInOutSine') infinite; }
.easeInOutExpo  { animation: translate 2s ease('easeInOutExpo') infinite; }
.easeInOutCirc  { animation: translate 2s ease('easeInOutCirc') infinite; }
.easeInOutBack  { animation: translate 2s ease('easeInOutBack') infinite; }

@keyframes translate {
  0% {
    transform: translateX(0px);
  }
  100% {
    transform: translateX(300px);
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console