How to write a CSS animation: 3 attributes implemented

Source: Internet
Author: User

3 Properties: Transition,animation,transform

Implementation steps:

1.CSS positioning 2.rgba Setting color transparency 3. Conversion + Animation Transform+animation 4. Smooth Transitions Transition Animation

======================== Beautiful Split Line =======================

Animation-delay

!transform move translate (npx,mpx), Zoom Scale[xy] (. N), tilt Skew (ndeg), rotate rotate[xyz] (ndeg) or rotate (1turn)

Border Implementing a circular, page-flipping effect that is loading

Animation rotation

<!DOCTYPE HTML><HTML><Head>    <title></title>    <styletype= "Text/css">@-webkit-keyframes Circle/*Safari and Chrome*/    {To{transform:Rotate (1turn);}} @keyframes Circle{To{transform:Rotate (1turn);}}. Ball{position:Absolute;Top:50%; Left:50%;width:50px;Height:50px;background:Red;Transform-origin:150% Center;//Transform-origin:250% Center;//Offset Axis animation:circle 1s infinite linear;-webkit-animation:circle 1s infinite linear;    }    </style></Head><Body>    <Divclass= "Ball"></Div></Body></HTML>

Ellipse effect: is the outer layer plus a div set animation Transform:scaley (200): Set the value of the y-axis zoom conversion

Pendulum effect:

. ball{transform-origin:center top; animation:sway 2.2s infinite Alternate ease-in-out} @keyframes sway{To{transform: Rotate (30deg);}

How to write a CSS animation: 3 attributes implemented

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.