Skip to content

Instantly share code, notes, and snippets.

@Acconut
Created August 28, 2012 16:42
Show Gist options
  • Save Acconut/3500291 to your computer and use it in GitHub Desktop.
Save Acconut/3500291 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
#warpper {
height: 200px;
width: 200px;
background: red;
position: relative;
}
#spin {
position: absolute;
background: blue;
height: 30px;
width: 15px;
top: 100px;
left: 100px;
animation-duration: 2s;
animation-name: spin;
animation-iteration-count: infinite;;
}
@keyframes spin {
0% { margin-top: 0px }
50% { margin-top: -30px }
100% { margin-top: 0px; }
}
@keyframes last-spin {
to { margin-top: 0px }
}
#warpper:hover #spin {
animation-name: last-spin !important;
animation-iteration-count: 1;
}
#spin #note {
background-color: white;
position: absolute;
width: 90px;
top: -30px;
left: -40px;
display: none;
}
#spin:hover #note {
display: block;
}
<div id="warpper">
<div id="spin">
<div id="note">Important, ok?</div>
</div>
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment