Css3 uses the transform attribute to create js elastic motion, css3transform
<! Doctype html>
<Html lang = "en-US">
<Head>
<Meta charset = "UTF-8">
<Title> Use css3 to simulate js elasticity </title>
</Head>
<Body>
<Style type = "text/css">
* {Margin: 0; padding: 0px ;}
Body {background: # b1b1b1; font-family: Arial; font-size: 125%; color: #202020 ;}
. Tips {width: 600px; margin: 0 auto; line-height: 24px; padding-top: 10px; font-size: 14px ;}
. Bredcolor {color: # fff ;}
. Envelope {
Font: 120px bold 'arial Rounded MT Bold '; color: # fff;
Position: absolute; top: 50%; left: 50%; margin-left:-422px; margin-top:-69px;
}
. Envelope_site {
-Webkit-transform-style: preserve-3d;/* remove text flashing */
-Webkit-transform: translateY (0px );
-Webkit-animation: envelope. 2 s internal-in, envelope_top. 7 s linear. 2 s;
}
. Envelope_site h1 {
Text-shadow: 4px 3px 4px #818181; font-family: 'arial Rounded MT Bold ';
Letter-spacing: 2px;
-Webkit-transform: translateY (-30px );
-Webkit-transition:-webkit-transform. 9 s linear 1 s;
}
@-Webkit-keyframes envelope {
0% {top: 0; left: 100%; margin-left: 0px; margin-top:-69px;-webkit-transform: translateY (0px );}
100% {top: 50%; left: 50%; margin-left:-276px; margin-top:-69px;-webkit-transform: translateY (0px );}
}
@-Webkit-keyframes envelope_top {
0% {-webkit-transform: translateY (0px );}
20% {-webkit-transform: translateY (-80px );}
40% {-webkit-transform: translateY (0px );}
60% {-webkit-transform: translateY (-30px );}
80% {-webkit-transform: translateY (0px );}
90% {-webkit-transform: translateY (-10px );}
100% {-webkit-transform: translateY (0px );}
}
</Style>
<Div> <A href = "http://www.999jiujiu.com/"> http://www.999jiujiu.com/</A> </div>
<Section class = "envelope envelope_site" id = "envelope">
<H1> css3tra <span class = "I _hiden"> I </span> n </Section>
</Body>
</Html>
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.