Pen Settings



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


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


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.


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.


                <header role="banner">
  <img src="//" width="64" height="auto" alt="scroll magic" />

<main class="full-screen" role="main">
  <section class="full-screen blue">
      <h1>Basic Tweening</h1>

  <section id="scale-trigger" class="full-screen orange">
    <div id="scale-animation">
      <p>This element will scale down using the scale value of the CSS transform property.</p>

  <section id="bg-trigger" class="full-screen red">
    <div id="bg-animation">
      <p>This element will have the background color change</p>
  <section id="yoyo-trigger" class="full-screen blue">
      <p id="yoyo-animation">Section Four yoyo Text!</p>


                @import "compass/css3";

	Demo Styles: NOT REQUIRED
body {
  margin: 0;
  height: 100%

p {
  margin: 0;
  padding: 0;

header {
  position: fixed;
  top: 10px;
  left: 10px;

section {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #EFEFEF;

.full-screen {
  height: 100%; /* makes panels the entire window height */

.blue {
	background-color: #3883d8;
.red {
	background-color: #cf3535;
.orange {
	background-color: #ea6300;


                // Scale Animation Setup
// .to('@target', @length, {@object})
var scale_tween ='#scale-animation', 1, {
  transform: 'scale(.75)',
  ease: Linear.easeNone

// BG Animation Setup
// .to('@target', @length, {@object})
var bg_tween ='#bg-trigger', 1, {
  backgroundColor: '#FFA500',
  ease: Linear.easeNone

// YoYo Animation Setup
// .to(@target, @length, @object)
var yoyo_tween ='#yoyo-animation', 1, {
  transform: 'scale(2)',
  ease: Cubic.easeOut,
  repeat: -1, // this negative value repeats the animation
  yoyo: true // make it bounce…yo!

// init ScrollMagic Controller
var controller = new ScrollMagic.Controller();

// Scale Scene
var scale_scene = new ScrollMagic.Scene({
  triggerElement: '#scale-trigger'

// Background Scene
var bg_scene = new  ScrollMagic.Scene({
  triggerElement: '#bg-trigger'

// YoYo Scene
var yoyo_scene = new  ScrollMagic.Scene({
  triggerElement: '#yoyo-trigger'