Css3transition Adding multiple transitions

Source: Internet
Author: User

This post consists of: http://xinpure.com/css3transition-to-add-multiple-transition-effects/

You can add more than one animation effect to an element by listening to an end event of an animation

Listening for animated events

-webkit-animation animations have three events: Start Event Webkitanimationstart, End Event Webkitanimationend, repeat motion event webkitanimationiteration

In the previous article, we demonstrated the effect of listening to an end event: CSS3 using animation to add multiple animation effects to the same element

Similarly,-webkit-transition can also hear animated events, but can only hear the end event Webkittransitionend

Instance HTML Code
<div id="ts_div"></div>
CSS Code
#ts_div {    width: 300px;    height: 300px;    margin: 100px auto 0;    background-color: #000;    transition: all 1s ease;}#ts_div:hover {    transform: translateX(200px);}
JS Code
var ts_div = document.getElementById("ts_div");$("#ts_div").bind("webkitTransitionEnd", function() {    ts_div.css("transform: translateX(-400px)")});
Effect illustration

Css3transition Adding multiple transitions

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.