CSS color gradients in different browser settings

Source: Internet
Author: User

In the Web development, inevitably encounter browser compatibility issues, about CSS set color gradient below there is a workaround, directly on the code:


Applies to Google Chrome:
Background:-webkit-gradient (linear, 0 0, 0 100%, from (#4285fa), to (#366dcb));
From: Refers to the gradient start color
To: Refers to the color at which the gradient ends


Suitable for use in Firefox browser
Background:-moz-linear-gradient (top, #4285fa, #366dcb);
Top: Is the value gradient direction from top to bottom
The first color refers to the gradient start color
The second color refers to the color at which the gradient ends


Suitable for use in IE browser
Filter:progid:DXImageTransform.Microsoft.gradient (gradienttype=0, startcolorstr= #4285fa, endcolorstr= #366dcb);
StartColorStr: Refers to the gradient start color
EndColorStr: Refers to the color of the end of the gradient

Turn from:

Http://www.cnblogs.com/MrALei/archive/2012/12/13/2816846.html

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.