Two CSS animation to discover the need for a previous project

Source: Internet
Author: User

First JS here:

  function addanimation (argument) {
            $ ('. Plane-outer '). addclass (' plane-outer-animation ');
            $ ('. Plane '). addclass (' plane-animation ');
            $ ('. Text '). addclass (' text-animation ');
        }
        function removeanimation (argument) {
            $ ('. Plane-outer '). Removeclass (' plane-outer-animation ');
            $ ('. Plane '). Removeclass (' plane-animation ');
            $ ('. Text '). Removeclass (' text-animation ');
        }
        Addanimation ();



Then use the timing to remove the animation:

  var num = 0;
        Function timing () {
            num++;
            if (num% = 0) {
                removeanimation ();
            } else if (num% = 2) {
                addanimation ();
        }} SetInterval ("timing ()", 1000);


Animate CSS on two div and finish off animation, CSS3 style as follows:

. Index. plane-outer-animation {
  -webkit-animation:forward 6s 1 linear;
          Animation:forward 6s 1 linear;
Index. plane-animation {
  -webkit-animation:down 6s 1 ease-in;
          Animation:down 6s 1 ease-in;
Index. text-animation {
  -webkit-animation:dashin 1s 5s 1 ease-in, wobble 2s 5s 2, dashout 5s 6s 1;
          Animation:dashin 1s 5s 1 ease-in, wobble 2s 5s 2, dashout 5s 6s 1;


Related Article

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.