Proficient in CSS Filter 4

Source: Internet
Author: User

7. Gray, Invert, and Xray filters
Syntax: {filter: gray}, {filter: invert}, {filter: xray}
The Gray filter turns an image into a grayscale image. The Invert filter turns all the visual attributes of an object, including color, saturation, and brightness values; the Xray filter allows an object to reflect its outlines and highlight these outlines, the so-called "X" films.
The effect is as follows:

8. Light filter
Syntax: Filter {light}
This property simulates the projection effect of the light source. Once the "LIGHT" filter attribute is defined for an object, you can call its "Method" to set or change the attribute. Available methods for "LIGHT" include:
 
· AddAmbient adds the surrounded light source
· AddCone added to conical light source
· Add AddPoint to the point light source
· Changcolor changes the color of light.
· Changstrength changes the intensity of the light source.
· Clear all light sources
· MoveLight mobile light source
You can define the virtual position of the light source, and control the focus position of the light source by adjusting the values of the x and y axes. You can also adjust the light source form (point light source or conical light source) specifies whether a light source has blurred borders, color, brightness, and other attributes. If the light source is set dynamically, unexpected results may occur. The following pages show examples.
9. Mask filter
Syntax: {filter: mask (color = color )}
Using the "MASK" attribute, you can create a film covering the surface for the object. The effect is the same as that of the wearing colored glasses.
10. Shadow filter
Syntax: {filter: shadow (color = color, direction = direction )}
You can use the "Shadow" attribute to create an object projection in the specified DIRECTION. COLOR is the projection COLOR, and DIRECTION is the projection DIRECTION. Where 0 degrees indicates vertical up, and then every 45 degrees is a unit. The default value is 270 degrees to the left.
Filter: shadow (color = red, direction = 225)
Filter: shadow (color = blue, direction = 225)
Filter: shadow (color = gray, direction = 225)
The results are as follows:
Shadow filter watermark workshop
Shadow filter watermark workshop
Shadow filter watermark workshop
11. Wave filter syntax: {filter: wave (add = add, freq = freq, lightstrength = strength, phase = phase, strength = strength )}
The "wave" attribute disrupts an object by the vertical waveform style. The default value is "TRUE (not 0 )",
"ADD" indicates whether to disrupt the object according to the waveform style,
"FREQ" refers to the ripple frequency, that is, the total number of complete ripple to be generated on the object,
The "LIGHTSTRENGTH" parameter can be used to enhance the effect of ripple-shaped light and shadows. The value range is 0----100,
The "PHASE" parameter is used to set the offset of the sine wave.
"STRENGTH" indicates the amplitude.

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.