cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="welcome-button">
  <div class="bt-sl-solid-l down out"></div>
  <div class="bt-sl-solid-r down out"></div>
  <div class="bt-slider-0 bt-slide-l out"></div>
  <div class="bt-slider-1 bt-slide-l out"></div>
  <div class="bt-slider-2 bt-slide-l out"></div>
  <div class="bt-slider-3 bt-slide-l out"></div>
  <div class="bt-slider-4 bt-slide-l out"></div>
  <a href="#" class="button out lin-t">
    Hover Over Me
  </a>
</div>
            
          
!
            
              @import "compass/css3";

body {
  background: #222;
}

a {
  text-decoration: none;
  @include transition( all 200ms ease-in );
}

.lin-t {
	  @include transition( all 300ms linear );
}

.button {
	  font-family: 'Aldrich', sans-serif;
	  text-align: center;
	  padding: 10px 10px;
	  color: white;
	  text-transform: uppercase;
}

.welcome-button {
	  position: fixed;
	  top: 40%;
	  left: 50%;
	  margin-left: -78px;
	  @include transition( all 600ms ease-in );

	  a {
		    line-height: 30px;
		    @include opacity( 1 );
		    @include transition( all 600ms ease-in );

		  &.out {
			    @include opacity( 0 );
	  	}
	}

	  &.out {
		    @include opacity( 0 );
	  }
    
}

[class*='bt-slider-'] {
	  left: 100%;
	  position: absolute;
	  height: 100%;
	  border-left: 1px solid white;
	  z-index: 1000;
	  @include opacity( 1 );

	  &.out {
		    @include opacity( 0 );
	  }
}

.bt-slide-l {
  left: 0;
}

.bt-slider-0 { @include transition( all 200ms ease-in ); }
.bt-slider-1 { @include transition( all 800ms ease-in ); }
.bt-slider-2 { @include transition( all 300ms ease-in ); }
.bt-slider-3 { @include transition( all 500ms ease-in ); }
.bt-slider-4 { @include transition( all 1000ms ease-in ); }

.bt-sl-solid-l {
	  position: absolute;
	  left: 0;
	  height: 100%;
	  border-left: 2px solid orange;
	  z-index: 1001;
	  @include transition( all 500ms ease-in-out );

	  &.out {
		    left: 50%;
	  }

	  &.down {
		    height: 0%;
	  }
}

.bt-sl-solid-r {
	  position: absolute;
	  right: -1px;
	  height: 100%;
	  border-left: 2px solid orange;
	  z-index: 1001;
	  @include transition( all 500ms ease-in-out );

	  &.out {
		    right: 50%;
	  }

	  &.down {
		    height: 0%;
	  }
}
            
          
!
            
              //If you like this and wish to use it please give credit where it is due! -Kaigth :)

//variables
var document = window.document,
	
	  $_window = $( window ),
    
  timeout,
    
  isAnimating = false,
  slideNum = 0,

  	$welcomeBarL = $( ".bt-sl-solid-l" ),
	  $welcomeBarR = $( ".bt-sl-solid-r" ),
	  $btSlideActive = $( ".welcome-button" ).find( ".bt-slide-l" ),

	  $welcomeBtn = $( ".welcome-button a" );
    
//------//

//Delegation
$welcomeBtn.on( 'mouseenter', function () {
	  var timeout,
		    $slidebar = $( '.bt-slider-' + slideNum ),
		    
    animate = function () {
      
			      timeout = setTimeout(function () {
				        clearTimeout( timeout );

				        if ( slideNum === 5 ) {
					
					          isAnimating = false;
          					slideNum = 0;

				        } else {

          					isAnimating = true;
          					$slidebar = $( '.bt-slider-' + slideNum );

          					$slidebar.removeClass( 'bt-slide-l' );

          					slideNum++;

          					animate();

				        }

      			}, 100 );
		   };

	  animate();
  
});

$welcomeBtn.on( 'mouseout', function () {
	  var timeout,
		      $slidebar = $( '.bt-slider-' + slideNum ),
        
		      animate = function () {
			
        timeout = setTimeout(function () {
          				clearTimeout( timeout );

          				if ( slideNum === 5 ) {

            					isAnimating = false;
            					slideNum = 0;

          				} else {

            					isAnimating = true;
            					$slidebar = $( '.bt-slider-' + slideNum );

            					$slidebar.addClass( 'bt-slide-l' );

            					slideNum++;

            					animate();

				          }

        			}, 100 );
    		};

  	animate();
  
});

$_window.on( "load", function () {

  timeout = setTimeout(function () {
					    clearTimeout();

					    $welcomeBarL.removeClass( "down" );
    					$welcomeBarR.removeClass( "down" );

  				}, 100 );
  
  				timeout = setTimeout(function () {
    					clearTimeout();

    					$welcomeBarL.removeClass( "out" );
    					$welcomeBarR.removeClass( "out" );

  				}, 400 );

  timeout = setTimeout(function () {
    					clearTimeout();

    					$welcomeBtn.removeClass( "out" );

  				}, 800 );

  timeout = setTimeout(function () {
    					clearTimeout();

    					$btSlideActive.removeClass( "out" );

  				}, 1000 );

});
            
          
!
999px
Loading ..................

Console