1 Overview
Ok, let's go into the most exciting part of CSS - filter, which will bring us into a beautiful multimedia world. It is a filter property, and the page becomes more beautiful. The identifier of the CSS filter property is Filter. In order to make you have a whole impression, let's take a look at its writing format:
FILTER: FilterName (parameters)
how about it? Is it very simple, it seems that there is no difference in definition with the presently attributes. FILTER is a filter property selector. That is, as long as you perform a filter operation, you must first define the filter; filter is a filter attribute name, including Alpha, Blur, Chroma, etc. A variety of properties, please see the table below:
Parameters in the Filter Expression in the above FILTER expression are parameters indicating the individual filter properties, but also these parameters determine how the filter will appear. Have a long list of long lists, is it very difficult? Don't tighten, let's take a brief introduction how these properties are implemented in CSS (very simple ^ _ ^). In the next section, we will first learn from the application of Alpha transparent properties.
2, alpha attribute
Alpha is to set transparency. Let's take a look at its expression format:
Filter: alpha (opacity = opcity, finishopacity = finishopacity, style = style, startx = startX, starty = starty, finishx = finishx, finishy = finishy)
Wow, how is it so long? Yes, but these parameters have their own use. Opacity represents a transparency level, optional value is completely transparent from 0 to 100, 0 representative, and 100 represents completely opaque. The Style parameter specifies the shape characteristics of the transparent area. One represents a unified shape; 1 represents the line shape; 2 represents the radiation; 3 represents the rectangular. Finishopacity is an option to set the transparency at the end, thereby achieving a gradient effect, and its value is from 0 to 100. StartX and Starty represent the beginning coordinates of the gradient transparent effect, finishx and finishy represent the end coordinates of the gradient transparent effect. From the above, we can see that if you do not set a transparent gradient effect, you can only set the parameter of Opacity. Said so much, let's take an example (see below):
The code that implements the above effect is as follows: