CSS3 animation effects: top and bottom rocking div

Source: Internet
Author: User
Tags x2 y2

CSS3 animation effects: top and bottom rocking div
<div id= "Square" class= "container animated" > Up/Down shaking </div>/** * Transform-origin Set the base point position of the rotation element * Animation-name Set animation name * Animation-duration Set animation time * Animation-fill-mode set the status after playback * Animation-iteration-count set the number of cycles to play * transition-timing-function:cubic-bezier Bezier effect, which has four values, refers to the point of two curves on the x-axis and the y-axis, the first point: X1 Y1; second point: X2 Y2 * Transform:translate3d sets the animation z-axis displacement of several elements, indicating that only moving on the z axis * * Note: Transform:translate3d is not equal to Transform:translatez 
    */. Animated{animation-duration:1s;/*Animation Time*/Animation-fill-mode:both;/*post-play status*/}. Animated{Animation-iteration-count:Infinite;/*number of action loops: Infinite Infinite loop*/}. Animated{animation-duration:2s;/*Animation Time*/}. Container{background:#2D97DB;width:90%;Height:90%;padding:100px;margin:20px Auto;font-family:"Microsoft Jas Black";font-size:40px;Color: White;text-align:Center;Line-height:90%;}. Container:hover{Animation-name:Container;/*name of the animation*/Transform-origin:Center Bottom;/*set the base point of the animation rotation element to: Center bottom*/cursor:Pointer;}@keyframes Container{0%, 100%, 20%, 50%, 80% {transition-timing-function:cubic-bezier (0.215,.61,.355,1);/*Bezier curve: X1 Y1 X2 Y2*/Transform:Translate3d (0,0,0);/*set to move only on the z axis*/}40%, 43%{transition-timing-function:cubic-bezier (0.755,0.50,0.855,0.060);Transform:Translate3d (0,-30px,0); }70%{transition-timing-function:cubic-bezier (0.755,0.050,0.855,0.060);Transform:Translate3d (0,-15px,0); }90%{Transform:Translate3d (0,-4px,0); }}

CSS3 animation effects: top and bottom rocking div

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.