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

              
                <body>
  <div id="container-1" class="container-default container-bottomswing-move" style="top: 10px; left: 650px; width: 1255px; height: 1065px;">
    Groot rechts
    <div class="reveal-default" id="reveal-1" style="width: 100%; background-color: red; height: 90%; margin-left: 20px;">
     <div id="box-1" class="box-default box-move-bottom">animate me </div><div id="box-2" class="box-default box-move-top" style="left: 130px;">all the way ...</div></div>
    </div>
  </div>

  <div id="container-2" class="container-default container-bottomswing-move2" style="top: 10px; left: 10px; width: 620px; height: 520px; transform-origin: left center 0px;">
    links boven
    <div class="reveal-default" id="reveal-2" style="width: 100%; background-color: red; height: 90%; margin-left: 20px;">
      <br /> animate me 1 ...</div>
  </div>

  <div id="container-3" class="container-default container-bottomswing-move2" style="top: 550px; left: 10px; width: 620px; height: 520px">
    links onder
    <div class="reveal-default" id="reveal-3" style="width: 100%; background-color: red; height: 90%; margin-left: 20px;">
      <br /> animate me 1 ...</div>
  </div>
</body>

              
            
!

CSS

              
                		body {
			background-color: green;
			width: 1920;
			height: 1080;
			overflow: hidden;
			x: 0px;
			y: 0px;
			
			-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
			backface-visibility: hidden;

		}
		
		.box-default
		{
		
			-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
			backface-visibility: hidden;

			position: fixed;
			opacity: 1;
			
			top: 20px;
			left: 20px;
			
			transition: all 1s ease 0.7s;
		}

		.box-move-bottom
		{
		
			position: fixed;
			opacity: 0;

			top: 800px;
			left: 150px;
			
		}
		
		.box-move-top
		{
		
			opacity: 0;

			transform: rotate(180deg);
			top: 0px;
			left: 150px;
			
		}		
		
		.container-default {
			
			-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
			backface-visibility: hidden;
	
			position: fixed;
			
			overflow: hidden;
			opacity: 1;
			border-radius: 10px;
			background-color:white;
			box-shadow: 0px 0px 10px #888888;
			
			will-change: transform, opacity;
	
			transform: matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
			transform-origin: center 85% 0px;
			transition: opacity 0.7s ease 0s, transform 0.7s ease 0s;
		}
		
		.container-bottomswing-move {
			opacity: 0;
			transform: matrix3d(1,0,0.00,0,0.00,0,1.00,-0.001,0,-1,0,0,0,0,0,1);
		}

		
		.container-leftswing-move {
			opacity: 0;
			transform: matrix3d(0,0,1.00,-0.001,0.00,1,0.00,0,-1,0,0,0,0,0,0,1);
		}
		
		.reveal-default
		{
			-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
			backface-visibility: hidden;

			position: fixed;
			
			will-change: clip-path;
			
			-webkit-clip-path: ellipse(100% 60% at 50% 160%); 
			clip-path: ellipse(100% 60% at 50% 160%);
			transition: all 1s ease 0.3s;
			height: 100%;
		}
		
		
		.reveal-move /* end stage */
		{
			-webkit-clip-path: ellipse(400% 100% at 100% 90%); 
			clip-path: ellipse(400% 100% at 100% 90%);
		}

              
            
!

JS

              
                /*!
 * classie - class helper functions
 * from bonzo https://github.com/ded/bonzo
 * 
 * classie.has( elem, 'my-class' ) -> true/false
 * classie.add( elem, 'my-new-class' )
 * classie.remove( elem, 'my-unwanted-class' )
 * classie.toggle( elem, 'my-class' )
 */

/*jshint browser: true, strict: true, undef: true */
/*global define: false */

(function(window) {

  'use strict';

  // class helper functions from bonzo https://github.com/ded/bonzo

  function classReg(className) {
    return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
  }

  // classList support for class management
  // altho to be fair, the api sucks because it won't accept multiple classes at once
  var hasClass, addClass, removeClass;

  if ('classList' in document.documentElement) {
    hasClass = function(elem, c) {
      return elem.classList.contains(c);
    };
    addClass = function(elem, c) {
      elem.classList.add(c);
    };
    removeClass = function(elem, c) {
      elem.classList.remove(c);
    };
  } else {
    hasClass = function(elem, c) {
      return classReg(c).test(elem.className);
    };
    addClass = function(elem, c) {
      if (!hasClass(elem, c)) {
        elem.className = elem.className + ' ' + c;
      }
    };
    removeClass = function(elem, c) {
      elem.className = elem.className.replace(classReg(c), ' ');
    };
  }

  function toggleClass(elem, c) {
    var fn = hasClass(elem, c) ? removeClass : addClass;
    fn(elem, c);
  }

  var classie = {
    // full names
    hasClass: hasClass,
    addClass: addClass,
    removeClass: removeClass,
    toggleClass: toggleClass,
    // short names
    has: hasClass,
    add: addClass,
    remove: removeClass,
    toggle: toggleClass
  };

  // transport
  if (typeof define === 'function' && define.amd) {
    // AMD
    define(classie);
  } else {
    // browser global
    window.classie = classie;
  }

})(window);



		function flyOut()
		{
			console.log("end animation");
			
			classie.add( document.getElementById("container-1"), 'container-bottomswing-move' );
			classie.add( document.getElementById("container-2"), 'container-leftswing-move' );
			classie.add( document.getElementById("container-3"), 'container-leftswing-move' );

			classie.remove( document.getElementById("reveal-1"), 'reveal-move' );
			classie.remove( document.getElementById("reveal-2"), 'reveal-move' );
			classie.remove( document.getElementById("reveal-3"), 'reveal-move' );
			
			classie.add( document.getElementById("box-1"), 'box-move-bottom' );
			classie.add( document.getElementById("box-2"), 'box-move-top' );

			setTimeout(function(){ 	reset() }, 1500);
		}
		
		function reset()
		{
			// disable the transitions
			setTimeout(function(){ 	flyIn() }, 50);
		}
		
		function flyIn()
		{
			console.log("start animation");
			
			classie.remove( document.getElementById("container-1"), 'container-bottomswing-move' );
			classie.remove( document.getElementById("container-2"), 'container-leftswing-move' );
			classie.remove( document.getElementById("container-3"), 'container-leftswing-move' );
			
			classie.add( document.getElementById("reveal-1"), 'reveal-move' );
			classie.add( document.getElementById("reveal-2"), 'reveal-move' );
			classie.add( document.getElementById("reveal-3"), 'reveal-move' );
			
			classie.remove( document.getElementById("box-1"), 'box-move-bottom' );
			classie.remove( document.getElementById("box-2"), 'box-move-top' );

			setTimeout(function(){ 	flyOut() }, 2000);
		}
		
		flyIn();

              
            
!
999px

Console