Animations for CSS

Source: Internet
Author: User

CSS animations are applied to Div, to Div plus CSS animations such as div rotation animation

CSS Section

. zhuan1{/*animation name for Turn 1 0.3 seconds one time to perform a stop*/Animation:zhuan10. 3s ease both;/*wait for 0s to start*/Animation-delay:0s;/*process at a constant speed*/Animation-timing-function:linear;}/*Turn animation 0% when the execution angle is 0deg 100% the execution angle is 180deg*/@-webkit-keyframes zhuan1{0%{transform:rotate (0deg); }     -%{transform:rotate (180deg);}}. zhuan2{/*animation name for 0.3 seconds to perform one stop at a time*/animation:zhuan20. 3s ease both;/*wait for 0s to start*/Animation-delay:0s;/*process at a constant speed*/Animation-timing-function:linear;}/*Turn animation 0% when the execution angle is 180deg 100% the execution angle is 0deg*/@-webkit-keyframes zhuan2{0%{transform:rotate (180deg); }     -%{transform:rotate (0deg);}}

JS section

//Navigate font move in move out display discolorationfunction Xianshibianse () {$ (". Li_"). MouseEnter (function () {$ ( This). CSS ('Color','#108EE9'); //Custom a BS variable, BS is the value of a custom attribute BS//Drop- down box shows hidden        varBS = $ ( This). attr ('BS'); $("#daohangxiala"+BS). CSS ("Display","Block"); //Customize a Class Property style: Animate Zhuan1 and zhuan2, move mouse over to perform animation 1, delete animation 2$(". ABC"+BS). Removeclass ("zhuan2"); $(". ABC"+BS). addclass ("Zhuan1"); })    $(". Li_"). MouseLeave (function () {$ ( This). CSS ('Color',' White'); varBS = $ ( This). attr ('BS'); $("#daohangxiala"+BS). CSS ("Display","None"); //Customize a Class Property style: Animate Zhuan1 and zhuan2, move mouse over to perform animation 2, delete animation 1$(". ABC"+BS). Removeclass ("Zhuan1"); $(". ABC"+BS). addclass ("zhuan2"); })

Animations for CSS

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.