cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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.

            
              <h3>In && Out Direction Aware Hover Fill</h3>
<button href="#">Yellow Button</button>
<button href="#">Green Button</button>
<button href="#">Pink Button</button>

<!--Also works with Tap > Direction In based on tap position; Direction Out based on tap position of the NEXT button tapped  !-->

            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Ubuntu:700);
* {
  margin: 0;
  padding: 0;
  border: 0;
  text-decoration: none;
  box-sizing: border-box; 
  overflow:auto;
}

body {
  font: 2vw 'Ubuntu', sans-serif;
  width:100%;
  height: 100%;
  background:hsla(350, 55%, 48%, 1);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-image: linear-gradient(to right top, hsla(0, 15%,15%, 0.5), hsla(0, 15%, 5%,1));
  background-image:-moz-linear-gradient(to right top, hsla(0, 15%,15%, 0.5), hsla(0, 15%, 5%,1));
}
h3{
  color: hsla(0, 0%, 55%, 1);
  text-align:center;
  margin-top:5%;  
  text-shadow:1px 1px hsla(0,5%,5%,.1), 2px -2px hsla(0,5%,5%,.1);
}
button{
    display: block;
    text-transform: uppercase;
    position:relative;
    margin: 5% auto;
    width:15%;
    cursor: pointer;
    color: hsla(0, 0%, 55%, 1);
    background: transparent;
    border: 1px solid hsla(0, 0%, 25%, .5);
    text-align: center;
    font-size: 1.5vw;
    font-weight: bold;
    padding: 1.5vw 0;
    text-shadow:1px 1px hsla(0,5%,5%,.3), 2px 2px hsla(0,5%,5%,.3);
    overflow:hidden;
    transition: all 0.3s ease-in;
}
button:hover{
  color:hsla(0, 0%, 15%, .5);
}
button:focus{
  color:hsla(0, 0%, 5%, 1);
}
.blob{
  z-index:-1;
  position:absolute;
  width:2px;
  height:2px;
  margin-left: 0;
  margin-top: 0;
  background:hsla(51, 95%, 65%, 1);
  border-radius: 50%;
  border-color:hsla(51, 95%, 65%, 1);
  border-width: 1px;
  border-style: solid;
  transition: border-width 0.7s ease-in-out,margin-left 0.7s ease-in-out,margin-top 0.7s ease-in-out;
}
.expand{
  border-color:hsla(51, 95%, 65%, 1);
  border-width: 300px;
  border-style: solid;
  transition: border-width 0.7s ease-in-out,margin-left 0.7s ease-in-out,margin-top 0.7s ease-in-out;
  margin-left:-300px;
  margin-top:-300px;
}
.green{
  border-color:hsla(152, 95%, 35%, 1);
}
.pink{
  border-color:hsla(324, 85%, 40%, 1);
}






            
          
!
            
              var ofs, x, y;
$('button').on('mouseenter', function(e){
  ofs = $(this).offset();
  x = (e.pageX - ofs.left);
  y = (e.pageY - ofs.top);
var name = $(this).text().toLowerCase().split(' ')[0];
  
$(this).append('<div class="blob ' + name + '" style="left:' + x + 'px; top: ' + y + 'px;"></div>');
  
var blob = $(this).find('.blob');
setTimeout(function(){
    blob.addClass("expand");
},20);
});

$('button').on('mouseleave', function(e){
  ofs = $(this).offset();
  x = (e.pageX - ofs.left);
  y = (e.pageY - ofs.top);
  var blob = $(this).find('.blob');
  blob.css({'left':x, 'top':y});
  blob.removeClass("expand");
  setTimeout(function(){
      blob.remove();
},800);
});


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console