Using CSS filters for color gradient effects

Source: Internet
Author: User
Tags readable

How to use CSS to achieve the color gradient effect, the effect of color gradient in Photoshop is achieved through the gradient tool, but you know, for the general color gradient CSS can also be done. Using CSS to complete the color gradient can reduce the size of the page, and can easily change the color of the gradient effect.

The Progid:DXImageTransform.Microsoft.Gradient filter makes it easy to achieve gradient effects.

The code is roughly as follows

[CSS Online]-Sample code progid:DXImageTransform.Microsoft.Gradient (startcolorstr= "LightBlue", endcolorstr= "#FFFFFF", Gradienttype= ' 1 '); Grammar

Filter:progid:DXImageTransform.Microsoft.Gradient (Enabled=benabled,startcolorstr=iwidth,endcolorstr=iwidth) Properties

Enabled: Options available. A Boolean value (Boolean). Sets or retrieves whether the filter is active. true | False
True: the default value. Filter activated.
False: The filter is forbidden.

StartColorStr: Available options. String. Sets or retrieves the start color and transparency of a color gradient.   The
is in #AARRGGBB format. AA, RR, GG, BB are 16 binary positive integers. The value range is 00-ff. RR Specifies the red value, GG specifies the green value, BB specifies the blue value, see #RRGGBB color units. AA specifies the transparency. 00 is completely transparent. FF is completely opaque. Values that exceed the range of values will be reverted to the default values. &NBSP
The value range is #FF000000-#FFFFFFFF. The default value is #FF0000FF. Opaque Blue.  
EndColorStr: Optional. String. Sets or retrieves the end color and transparency of a color gradient. See StartColorStr properties. The default value is #FF000000. Opaque black. Properties

Enabled: Readable and writable. A Boolean value (Boolean). See the Enabled property.
GradientType: Readable and writable. Integer value (integer). Sets or retrieves the direction of the color gradient. 1 | 0
1: Default value. Horizontal gradient.
0: Vertical gradient.
STARTCOLORSTR: Readable and writable. String. See StartColorStr properties.
StartColor: Readable and writable. Integer value (integer). Sets or retrieves the start color of a color gradient. The value range is 0-4294967295. 0 is transparent. 4294967295 is opaque white.
ENDCOLORSTR: Readable and writable. String. Sets or retrieves the end color and transparency of a color gradient. See StartColorStr properties. The default value is #FF000000. Opaque black.
EndColor: Readable and writable. Integer value (integer). Sets or retrieves the end color of a color gradient. The value range is 0-4294967295. 0 is transparent. 4294967295 is opaque white. When you use this attribute in a script, you can also use the hexadecimal format: 0xAARRGGBB. Description

Displays a custom color layer between the object's background and content.
When this effect is displayed by a transition, the text program on top of the gradient book's color layer is initialized to transparent, and when the color ramp is implemented, the text color is updated with its defined values.

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.