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.