WEB Mobile-CSS3 animation performance optimization

Source: Internet
Author: User

Many times, we in the development of mobile side to make their own web pages compatible with different models, many times will use CSS3 animation, but many times in the Android machine, animation obviously will appear stuttering, it is difficult to see, then here I introduce a few CSS properties for hardware acceleration then will get obvious effect:

Opacity:1;

-webkit-backface-visibility:hidden;

-webkit-transform:translate3d (0,0,0);

These three attributes select one of the elements to use the animation, many times you use the-webkit-transform: This property does the other value, then you can not use this, choose the other two.

There are some optimizations that use less expensive attributes css shadow ,background-attachment: fixed 等这些属性,并且如果使用了left top 定位,那么最好使用 -webkit-transform:translateX ,-webkit-transform:translateY 代替,提高动画流畅性...

WEB Mobile-CSS3 animation performance optimization

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.