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

              
                #test1.test
  .bg
  .neverascoolasapple
    .hi
      |cool 1.
              
            
!

CSS

              
                html
  height 100%
  margin 0 auto
  padding 0 auto
body
  margin 0 auto
  padding 0 auto
  overflow hidden
  background rgb(10,10,10)
  height 100%

  display flex
  flex-direction row
  align-items stretch
  align-content stretch

.test
  overflow hidden
  position relative
  width 100%
  height 100%

.bg
  position absolute
  width 100%
  height 100%
  background linear-gradient(45deg,rgb(255,50,0),rgb(255,15,85));
  
.neverascoolasapple
  color #000
  height 100%
  font-size 30px
  display flex
  justify-content center
  align-items center
 
    
  
  
  
  
  
  
._intui_el {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: nowrap;
      -ms-flex-wrap: nowrap;
          flex-wrap: nowrap;
  height: 100%;
  width: 100%;
}
._intui_wp {
  position: relative;
  -webkit-align-self: stretch;
      -ms-flex-item-align: stretch;
          align-self: stretch;
  overflow-x: hidden;
  overflow-y: hidden;
  height: 100%;
  width: 100%;
}
._intui_overlay {
  pointer-events: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
._intui_loader {
  pointer-events: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  background: #000;
}
._intui_right {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
      -ms-flex-direction: row;
          flex-direction: row;
}
._intui_left {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: reverse;
  -webkit-flex-direction: row-reverse;
      -ms-flex-direction: row-reverse;
          flex-direction: row-reverse;
}
._intui_down {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
}
._intui_up {
  -webkit-box-orient: vertical;
  -webkit-box-direction: reverse;
  -webkit-flex-direction: column-reverse;
      -ms-flex-direction: column-reverse;
          flex-direction: column-reverse;
}
._intui_loader_wrap {
  position: relative;
  height: 100%;
  width: 100%;
  -webkit-filter: unquote('blur(15px) contrast(70)');
  background: #000;

}
._intui_loader_c {
  top: 50%;
  left: 50%;
  position: absolute;
}
._intui_loader {
  position: absolute;
  height: 100%;
  width: 100%;
  background: #000;
  overflow: hidden;
}
._intui_loader_nub {
  -webkit-transform: scale(0);
      -ms-transform: scale(0);
          transform: scale(0);
  margin: 0 auto;
  -webkit-backface-visibility: hidden;
  width: 70px;
  height: 70px;
  margin-left: -35px;
  margin-top: -35px;
  border-radius: 100%;
  background: #fff;
}
._intui_loader_tick {
  margin-left: -17.5px;
  margin-top: -17.5px;
  width: 35px;
  height: 35px;
  border-radius: 100%;
  background: #00f;
  -webkit-filter: saturate(0);
  -webkit-transform: rotate(90deg);
      -ms-transform: rotate(90deg);
          transform: rotate(90deg);
}

._intui_loader_tick2 {
  margin-left: -17.5px;
  margin-top: -17.5px;
  width: 35px;
  height: 35px;
  border-radius: 100%;
  background: #00f;
  -webkit-filter: saturate(0);
  -webkit-transform: rotate(90deg);
      -ms-transform: rotate(90deg);
          transform: rotate(90deg);
}
              
            
!

JS

              
                var intui = intui || {};
intui.loader = (function(){
  var templ = '<div class="_intui_loader"><div class="_intui_loader_wrap"><div class="_intui_loader_nub _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick2 _intui_loader_c"/><div class="_intui_loader_tick _intui_loader_c"/><div class="_intui_loader_tick _intui_loader_c"/><div class="_intui_loader_tick _intui_loader_c"/><div class="_intui_loader_tick _intui_loader_c"/></div></div>';
  var d = 40;
  var loading = false;
  var trans = 1;
  var easein = 'cubic-bezier(0.310,2.5, 0.170, 1.010)'
  var easeout = 'cubic-bezier(.75,.19,.13,.84)'
  var trans2 = 1;
  var go = function(el){
     if(!el._intui_loader) return;
     $(el._intui_loader.querySelectorAll('._intui_loader_tick')).each(function(i){
      if(this == el) return;
       //just fuck around with this for hours....
       if(i%2){
           var x = Math.sin(i*1.5)*d;
           var y = Math.cos(-el._intui_loader_start + Date.now()/700+i/2.5)*d*1.5;
           this.style.transform ='translate('+x+'px,'+y+'px) scale('+(2-Math.abs(Math.sin(Date.now()/2800+i)))+')';
       }else{
           var x = Math.sin(el._intui_loader_start + Date.now()/700+i/1.3)*d;
           var y = -Math.cos(el._intui_loader_start + Date.now()/700+i/1.5)*d/1.2;
           this.style.transform ='translate('+x+'px,'+y+'px) scale('+(1.7-Math.abs(Math.sin(Date.now()/2800+i)))+')';
       }
       //-----------------------
    });
    window.requestAnimationFrame(el._intui_lo);
  }
  var slide = function(el,nub,ldr,split){

    //console.log(split)
    switch(split){
      default:
        var t = 'translate(0px,0px)';
        break;
      case 'left':
        var t = 'translate('+(-el.clientWidth)+'px,'+0+'px)';
        break;
      case 'right':
        var t = 'translate('+(el.clientWidth)+'px,'+0+'px)';
        break;
      case 'down':
        var t = 'translate(0px,'+(el.clientHeight)+'px)';
        break;
      case 'up':
        var t = 'translate(0px,'+(-el.clientHeight)+'px)';  
    }
    nub.style.webkitTransform = ldr.style.webkitTransform = t
  }


  
  var neighbors = function(el,split,time){
		
    var el = el,split = split,time = time;
    
    $(el).children().each(function(i){
     		
      console.log(this.nodeType)
      if(this.nodeType != 1) return;
      
      
      if(this == el._intui_loader) return

     
      
      if(split == null && time == 0){
        console.log('NO')
        $(neigh).css('-webkit-transition',null)
        return;
      }else if(split != null){
        console.log('YES')
         console.log(this.style)
        this._transv = this.style.webkitTransition
        this._transf = this.style.webkitTransform 
      }
      this.style.webkitTransition = 'transform '+time+'s '+easeout+' 0s';
      slide(el,this,this,split);
      
    });
    
    for(var i =0;i< el.childNodes.length;i++){
      var neigh = el.childNodes[i];
      console.log('child:',neigh)

    }
  }

  //spread the other ticks around
  var spreadaround = function(el){
    var ticks = el.querySelectorAll('._intui_loader_tick2');
   $(ticks).each(function(i){
      var a_off = 0
      var angle = -0.2+Math.PI/2.5*i+a_off;
      var dd = d;
      var s = 1.5
      if(i>4){
        dd = d*2
        angle = 2+Math.PI/2.5*i+a_off;
        s = 2;
      }
      this.style.webkitTransform = 'translate('+(Math.cos(angle)*dd*3)+'px,'+(Math.sin(angle)*dd*3)+'px) scale('+(s+Math.random()*0.5)+')';
   })
  }

  return{
    delaystart: function(el,split,d){
      setTimeout(function() {this.start(el,split)}.bind(this),d);
    },
    start: function(el,split){
      var q = $(el);
      var el = $(el)[0];
      if(el._intui_loader != null) return false
      q.append(templ);
      spreadaround(el);
      var nub = el.querySelector('._intui_loader_nub')
      el._intui_loader = el.querySelector('._intui_loader');
      el._intui_loader_start = Date.now();
      nub.style.webkitTransform = 'scale(0)';
      nub.style.webkitTransition = 'transform '+trans+'s '+easein+' 0s';
      el._intui_loader.style.opacity = 1;
      nub.style.webkitTransform = 'scale(1)';
 
      el._intui_lo = function(){
        go(this);
      }.bind(el);
      
			console.log(el);
      //set position for neighbors
      neighbors(el,split,0);

      el._intui_lo();
    },
    
    end: function(el,split){
      var el = $(el)[0],q = $(el),nub = el.querySelector('._intui_loader_nub')
      if(el._intui_loader == null) return;
      nub.style.webkitTransition = 'transform '+trans2+'s '+easeout+' 0s';
      el._intui_loader.style.webkitTransition = 'all '+trans2+'s '+easeout+' 0s';

      neighbors(el,null,trans2);
      setTimeout(function(){
        neighbors(el,null,0);

      }, trans2*1000);
      //el.querySelector('._intui_loader').style.opacity = 0.6
      
      slide(el,nub,el.querySelector('._intui_loader'),split);
     
      el._intui_loader = null;
      el._intui_lo = null;  
      setTimeout(function(){
         this.removeChild( el.querySelector('._intui_loader'));

      }.bind(el),trans2*1000+100);
    }
  }
})();



intui.loader.start('#test1','down');
//intui.loader.start('#test1','down');
//intui.loader.start('#test2');
//intui.loader.start('#test3');
//intui.loader.start('#test4');
var i = 0,j=0,k=0,l=0;

var b = setInterval(function(){
  j++;
  if(j%2){
    intui.loader.start('#test1','down');
  }else{
    intui.loader.end('#test1','up');
  }
	

},1600)



/*setInterval(function(){
  l++;
  if(l%2){
    intui.loader.start('#test2','up');
  }else{
    intui.loader.end('#test2','down');
  }
},1600)*/

              
            
!
999px

Console