Skip to content

Instantly share code, notes, and snippets.

@argyleink
Created February 20, 2013 01:27
Show Gist options
  • Save argyleink/4991910 to your computer and use it in GitHub Desktop.
Save argyleink/4991910 to your computer and use it in GitHub Desktop.
Basic CSS Animation
/**
* Basic CSS Animation
*/
body,html{
height:100%;width:100%;
margin:0;padding:0;
}
.hello{
display: block;
height:500px;
width:500px;
position: absolute;
top:50px;
left:50px;
background-color: #666;
color: #fff;
font-size:100px;
line-height:500px;
text-align: center;
font-family: Arial;
text-decoration: none;
-webkit-transition: all 1s ease;
}
.goodbye{
display: block;
height:200px;
width:200px;
position: absolute;
top:100px;
left:50px;
background-color: red;
-webkit-transition: all 1s ease;
}
.hello:hover{
left: 400px;
background-color: #ccc;
}
.hello:hover .goodbye{
left: 400px;
background-color: #ccc;
}
<a href="#" class="hello">
hello
<div class="goodbye">bye</div>
</a>
<div class="box">
<div class="overlay">
Peek
</div>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment