Skip to content

Instantly share code, notes, and snippets.

@Antonio-Laguna
Created December 26, 2012 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Antonio-Laguna/4379464 to your computer and use it in GitHub Desktop.
Save Antonio-Laguna/4379464 to your computer and use it in GitHub Desktop.
Ring ring!
/**
* Ring ring!
*/
body {
background: #EFEFEF;
}
div.recuadro {
background: #fff;
margin: 0 300px;
width: 200px;
padding: 50px;
text-align: center;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;
-moz-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;
box-shadow: rgba(0,0,0,0.2) 0px 1px 3px;
}
@-webkit-keyframes temblar {
0% { -webkit-transform: translate(2px, 1px) rotate(0deg); }
10% { -webkit-transform: translate(-1px, -2px) rotate(-1deg); }
20% { -webkit-transform: translate(-3px, 0px) rotate(1deg); }
30% { -webkit-transform: translate(0px, 2px) rotate(0deg); }
40% { -webkit-transform: translate(1px, -1px) rotate(1deg); }
50% { -webkit-transform: translate(-1px, 1px) rotate(-1deg); }
60% { -webkit-transform: translate(-3px, -2px) rotate(0deg); }
70% { -webkit-transform: translate(2px, 1px) rotate(-1deg); }
80% { -webkit-transform: translate(-1px, -2px) rotate(1deg); }
90% { -webkit-transform: translate(2px, -1px) rotate(0deg); }
100% { -webkit-transform: translate(1px, -2px) rotate(-1deg); }
}
@keyframes temblar {
0% { transform: translate(2px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(0px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 1px) rotate(-1deg); }
60% { transform: translate(-3px, -2px) rotate(0deg); }
70% { transform: translate(2px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -2px) rotate(1deg); }
90% { transform: translate(2px, -1px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
}
.recuadro {
animation-name: 'temblar';
-webkit-animation-name: 'temblar';
animation-duration: 0.8s;
-webkit-animation-duration: 0.8s;
transform-origin:50% 50%;
-webkit-transform-origin:50% 50%;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
animation-timing-function: linear;
-webkit-animation-timing-function: linear;
}
<div class="recuadro">Pasa el cursor por encima</div>
// alert('Hello world!');
{"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