Skip to content

Instantly share code, notes, and snippets.

@Colt
Created October 1, 2013 18:36
Show Gist options
  • Select an option

  • Save Colt/6782996 to your computer and use it in GitHub Desktop.

Select an option

Save Colt/6782996 to your computer and use it in GitHub Desktop.
Hover Code
<!DOCTYPE html>
<html>
<head>
<style>
a {
color: white;
text-decoration: none;
font-size: 40px;
}
.effect-1 {
position: relative;
height: 100px;
width: 100px;
margin: 100px;
@include border-radius(50%);
display: block;
text-align: center;
line-height: 100px;
font-family: 'Monoton', cursive;
background-color: black;
-webkit-transform: translateZ(0);
&:hover {
background-color: rgba(0,0,0,0.8);
@include transition(background-color 0.2s);
&:after {
@include scale(1);
@include transition(transform 0.2s);
}
}
}
.effect-1:after {
position: absolute;
top:-10px;
left: -10px;
content: '';
height: 100%;
width: 100%;
padding: 10px;
@include border-radius(50%);
@include box-shadow(0 0 0 5px rgba(0,0,0,0.8));
@include scale(0.7);
@include transition(transform 0.2s);
}
</style>
<meta charset="UTF-8">
<title>Sample document</title>
</head>
<body>
<p>
<link href='http://fonts.googleapis.com/css?family=Monoton' rel='stylesheet' type='text/css'>
<a href="#" class="btn effect-1">M</a>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment