CSS3 Transition-Ground tornado

Source: Internet
Author: User

0. Environmental preparedness

  (1) The transition requires browser support, using these attributes to add browser vendor prefix, I use the chrome49 no longer need to prefix,

-o-opera

-webkit-safari, Chrome

-moz-firefox

-ms-ie

(2) CSS

P

{

height:15px; / * Similar to the height of this property, you must explicitly specify the value * /

    

}

P:hover/* Initial p:hover*/

{

    

height:100px;

}

(3) HTML file body part

<p></p>

1. Quick Use

Add the following attribute to the initial p:hover

transition:background 2s linear 1s,height 1s linear 1s;

2. Detailed

  (1) individual designation, attribute explanation

Add the following attribute to the initial p:hover

Transition-property:height,background-color;

Transition-duration:1s,2s;

Transition-timing-function:linear;

Transition-delay:1000ms,1s;

Transition-property specify which properties to change

Not recommended to write all, the rules are difficult to fathom

Transition-duration height from execution to end is 1s,background-color from execution to end is 2s,height change ends, background-color change ends with 1s left

Write only one value, then all properties apply this value, in addition, let the number of transition-duration values equal to the number of transition-duration values

Transition-timing-function:linear The law of change, please find it yourself

Write only one value, then all properties apply this value, in addition, let the number of transition-timing-function values equal to the number of Transition-property values

Transition-delay:1000ms,1s;height begins to change after 1s, where background-color and height begin to change at the same time

Write only one value, then all properties apply this value, in addition, let the number of transition-delay values equal to the number of Transition-property values

These properties can only occur once, otherwise the following overrides the previous

(2) Comprehensive use

Add the following attribute to the initial p:hover

transition:background 2s linear 1s,height 1s linear 1s;

<transition-property><transition-duration><transition-timing-function><transition-delay >

<> Optional parameters, please write all

These properties can only occur once, otherwise the following overrides the previous

*transition and other sub-written transitions are also covered, and the back covers the front

CSS3 Transition-Ground tornado

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.