CSS animations: Moving, zooming, rotating, skewing the implementation

Source: Internet
Author: User

Move attribute: Translate

Scaling Properties: Scale

Rotation properties: roate

Tilt Properties: Skew

HTML: Define five properties to compare, link into CSS file

<! DOCTYPE html>

CSS file:

div{    width:200px;    height:200px;    Background: #20ff26;    Margin:auto;} /* The distance between the X and Y axes is moved horizontally, the first parameter in translate () is the x-axis moving distance, the second parameter is the y-axis moving distance */.div2{transform:translate (100px,100px);} /* Rotation angle, Unit is deg*/.div3{transform:rotate (200DEG);} /* Scale effect, the first parameter is a multiple of the x-axis scale, and the second parameter is a multiple of the y-axis scale. Greater than 1 is magnification, less than 1 is reduced, 1 is normal multiple */.div4{    Transform:scale (0.5,0.5);} /* Tilt effect, the first parameter is the rotation angle around the x axis, the second parameter is the rotation angle around the y axis */.div5{    transform:skew (10deg,10deg);}

Implementation results:

CSS animations: Moving, zooming, rotating, skewing the implementation

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.