Style Table is a technology that provides enhanced supplemental services for hypertext tag languages, allowing alficient modifications to each HTML tag. Only HTML is made of web pages, the modified ability of each part of the page is limited and the statement is annoying, the style sheet is to compensate for the powerful technology of this defect, and its statement is simple, as long as the STYLE statement is inserted into the STYLE statement to easily implement the page. Endless text color, background, border, line spacing, 删 修 修 修 网 使 使. 活 活 使 使 使 使 活 活 活 活 活 活 活, 活,,,, Of course, the power of the style sheet is still its filter function. Because there is a filter, you can easily create the artistic effect of "professional". In order to help everyone use a good style sheet filter, the author will introduce the contents of the style sheet filter.
First, what is a style sheet filter
Speaking of the filter, it is not what processing the image, but is modified to the object using the property in the browser. The style sheet filter is actually a new extension section of the style table. Use this technology simple syntax to add visualized filters and conversion effects to a standard HTML element, such as pictures, text, and others. Add some rich changes to the page. If you have some scripting languages, you can make some binding of the filter effect with the script code similar to JavaScript, you can have a powerful dynamic interaction documentation tool established under the work of style sheets and scripts. There are 13 filters that can now be used, but to enjoy these filters, the user's browser must be required to be above IE4.0 / NC6.0 because only these version of browser can support style. Table filter effect.
Second, the common style sheet filter
As the style sheet technology is constantly ripe, the filter function and species are also increasing. If the user can be skilled in mixing, it will produce an idea. In operation, the user only needs to know the actual effect of the specific filter, it can be fine-tuning according to the actual. In order to make everyone can use the filter to use the filter, the author will introduce some of the function and parameters of some common filters as follows:
1, α filter
Role: This filter can achieve various amounts of solubility. If you combine the filter with the web script language, if you process the parameters of the filter, you can easily make fade out.
Syntax: {filter: alpha (opacity = Opacity, finishopacity = finishopacity,
Style = style, startx = startX, starty = starty, finishx = finishx, finishy = finishy)}
Parameters: Opacity parameter represents the initial transparency of the image, its default value is completely transparent from 0 to 100, 0, and 100 represents completely opaque; Finishopacity is an optional parameter, if you want to set the transparent effect of gradient, you can Use them to specify the transparency at the end, the scope is also 0 to 100; Style represents the shape characteristics of the transparent area, where "0" represents the unified shape, "1" represents linear. "2" represents the radiation, "3" represents a rectangle; StartX indicates the X coordinates at the beginning of the gradient transparent effect, and Starty represents the Y coordinate at the beginning of the gradient transparent effect. The Finishx represents the X coordinate at the end of the gradient transparent effect, Finishy indicates a gradient transparent effect. The y coordinate at the end.
2, blurry filter
Role: This filter is mainly to create a fuzzy effect.
Syntax: {filter: blur (add = add, direction = Direction, strongth = strength)} Parameters: This filter mainly includes three parameters, where add is a fuzzy effect of whether the image is changed to an impressionist, a fuzzy effect It is done in the direction of clockwise, its value should be Ture or false; the Direction parameter is used to set the blurred direction, where 0 degrees represent vertical up, each 45 degrees to one unit, the default value is to the left 270 Degree; the STRENGTH parameter represents how much pixels will be affected, and the default parameter value is 5 pixels, and this parameter value can only be specified using an integer.
3, slope filter
Role: This filter is mainly to establish an outline effect of the object, which can establish a projection of an object in the designated direction;
Syntax: {filter: shadow (color = color, direction = direction)}
Parameters: The slope filter has only two parameters, where Color represents the base color of the projection, which is replaced with English letters. For example, the projection base color is red, it should set the color = red; the Direction parameter is used to set projounds In the direction, if the value is 0, it represents the vertical projection, and the value is one unit every 45 degrees, and its default value is 270 degrees to the left.
4, luminescent filter
Role: This filter can produce a luminous effect to the image or text;
Syntax: {filter: glow (color = color, stregth = strength)}
Parameters: The color parameter of the filter is almost the same as the Color parameter function of the shadow filter, but the Color parameter here is used to set the glow color; the Strength parameter is used to specify the light-emitting intensity, its value is 1 to 255 Any integer between.
5, light filter
Role: The light filter is an analog source to projection or image, allowing image and text to produce a certain projection effect;
Grammar: {filter: light}
Parameters: Once the "Light" filter properties are defined for the object, you can call its "method (Method)" to set or change the properties, the method available to the filter is: the addambient method is used to join the enclosed light source. The AddCone method is used to add a tapered source. The MOVELIGHT method is used to move the light source. The ChangstRength method is used to change the intensity of the light source. The CHANGCOLOR method is used to change the color of the light. The CLEAR method is used to clear all light sources. of.
6, mask filter
Role: This filter can establish a film covering the surface, which effect is like an object with a colored glasses.
Syntax: {filter: mask (color = color)}
Parameters: The color parameter of the filter represents the color of the surface of the object, for example, if the mask color is green, you should set the color = blue.
7, shadow filter
Role: The shadow filter is to add a shadow effect to the object, and its working principle is to establish an offset, plus color.
Syntax: {Filter: Dropshadow (color = color, offx = offx, offy = offy, posTIVE = posTIVE)}
Parameter: The color parameter in the filter represents the color of the projected shadow. OFFX indicates the offset of the horizontal direction. OFFY indicates the offset of the vertical direction. The POSTIVE parameter is a Boolean value, and if it is true, Establish visible projections for any non-transparent pixels. If FASLE, the transparent effect is established for the transparent pixel portion. 8, grayscale filter
Role: This filter is mainly to convert image objects into grayscale.
Syntax: {filter: gray}
Parameters: This filter has no parameters.
9, flip filter
Role: The flip filter is mainly horizontal or vertical flip effect.
Syntax: {filter: filph} {filter: filpv}
Parameters; this filter also does not with parameters, where {filter: film} is a horizontal flip, {filter: Filpv} is vertically flipped.
10, X-ray filter
Role: X-ray filters allow objects to reflect its outline and highlight these contours.
Syntax: {filter: xray}
Parameters: This filter itself does not contain parameters.
11, inverted filter
Role: Use this filter to flush all visual properties including color, saturation, and brightness values.
Syntax: {filter: invert}
Parameters: This filter has no parameters.
12, corrugation filter
Role: Corrugation filter can use a sine wave to disrupt image in horizontal and vertical directions, so that the image produces a water wave effect.
Syntax: {Filter: Wave (add = add, freq = freq, lightstreamth = strength, phase = phase, streg = strength)}
Parameters: The add parameter of the filter is a Boolean value. It is used to indicate whether the object is disrtoossed according to the waveform style; the FREQ parameter is used to set the ripple frequency, that is, how many completes are specified on the object? Corrugation; the Lightstregth parameter can set the enhanced effect of corrugated light, and the value ranges between 0 and 100; the phase parameter is used to set the offset of the sine wave, and Stregth is the magnitude of the sine wave.