Gradient gradient IE compatible processing method explanation

Source: Internet
Author: User
Depending on the Caniuse (http://caniuse.com/#search =gradient), RGBA compatibility is IE10 and above browsers.

Instance code:

<!doctype html>

Chrome browser Effects:

IE8 Browser effects (no gradients):

RGBA Compatibility Processing:

.parent {width:400px;                height:400px;                margin:100px;                font-size:20px;                Color: #FF0000;                border:1px solid red;                Background: #000000;                Background:-moz-linear-gradient (top, #000000 0, #ffffff 100%);                Background:-webkit-gradient (linear, left top, left bottom, Color-stop (0%, #000000), Color-stop (100%, #ffffff));                Background:-webkit-linear-gradient (top, #000000 0, #ffffff 100%);                Background:-o-linear-gradient (top, #000000 0, #ffffff 100%);                Background:-ms-linear-gradient (top, #000000 0, #ffffff 100%);                Background:linear-gradient (to bottom, #000000 0, #ffffff 100%); /* Key Property Set */Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= ' #000000 ', endcolorstr= ' #fffff            F ', gradienttype=0); }

Setting the Filter property to be performed when the transparency of the previous line does not work, filter:progid:DXImageTransform.Microsoft.gradient is used to do gradients, GradientType: Read and Write, Set or retrieve the direction of the color gradient:
1: Default value. Horizontal gradient.
0: Vertical gradient.

Summary: This completes IE9 and the following IE browser gradient compatibility processing.

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.