CSS filter effect (i) _ Basic tutorial

Source: Internet
Author: User
Tags transparent color
1. Alpha Filter

Syntax:

{Filter:alpha (opacity=opacity,finishopacity=finishopacity,style=style,startx=startx,starty=starty,finishx= Finishx,finishy=finishy)}

The Alpha attribute is a blend of a target element with the background. Designers can specify values to control the degree of blending. This "mixed with background" is popularly said to be the transparency of an element. By specifying coordinates, you can refer to the transparency of the point, line, and polygon. Their parameters have the following meanings:
"Opacity" represents the level of transparency. The default range is from 0 to 100, and they are actually in percent form. In other words, 0 is completely transparent and 100 is completely opaque. "Finishopacity" is an optional parameter that you can use to specify the transparency at the end if you want to set the transparency effect of the gradient. The range is also 0 to 100. The style parameter specifies the shape characteristics of the transparent area. 0 of them represent a uniform shape, 1 are linear, 2 are radial, and 3 represent rectangles. "STARTX" and "Starty" represent the start x and y coordinates of the gradient transparency effect. "Finishx" and "finishy" represent the coordinates of the gradient transparency effect ending with x and Y.

The effect is as follows:

 

2. Blur Filter

Syntax: for HTML:

{Ilter:blur (Add=add,direction=direction,strength=strength)}

For script languages:

[Oblurfilter=] Object.filters.blur

The picture becomes blurred when the finger is quickly crossed in a painting that is not yet dry. "Blur" is to produce the same blur effect.
The "ADD" parameter is a Boolean judgment of "TRUE (default)" or "FALSE". It specifies whether the picture has been altered into an impressionist blur effect. The blur effect is in a clockwise direction, and the "DIRECTION" parameter is used to set the direction of the blur. where 0 degrees represents a vertical upward, and then every 45 degrees is a unit. Its default value is 270 degrees to the left. The "Strength" value can only be specified using integers, and she represents how many pixels the width will be affected by the blur. The default is 5. For fonts on a Web page, if you set his fuzzy "add=1", the effects of these fonts will look great. As follows:

Filter:blur (add=ture,direction=135,strength=10)

I fly to you, the rain gently!


3, Fliph, FLIPV filter

Syntax: {Filter:filph}, {FILTER:FILPV} is both horizontal and vertical inversion, as follows:

4. Chroma Filter

Grammar:

{Filter:chroma (Color=color)}

Use the Chroma property to set the color specified in an object as a transparent color, which is the color to be transparent. Below is the blue text, and then use the chroma filter to filter off the blue color, it becomes the following look.

Filter:chroma (Color=blue)

Drip Eaves Square



 

5. DropShadow Filter

Grammar:

{Filter:dropshadow (color=color,offx=ofx,offy=offy,positive=positive)}


"Dropshaow" is the name of the shadow effect of adding objects. It works by creating an offset, plus a darker one. "Color" represents the color of the cast shadow, "OFFX" and "Offy" are the hungry offsets of the X-direction and Y-direction shadows, respectively. The "Positive" parameter is a Boolean value, and if True (not 0), a visible projection is established for any non-transparent pixels. If it is "Fasle (0)", then create a transparent effect for the transparent pixel portion

Normal text Text after DropShadow (color=gray,offx=5,offy=5.positive=0)

6. Glow Filter

Grammar:

{Filter:glow (Color=color,strength)}

When you use the "Glow" property on an object, the edge of the object produces a glow-like effect. "Color" is the color of the specified glow, and "strength" is the performance of intensity, which can be specified by any integer from 1 to 255.
Effect after Filter:glow (color=red,strength=10)

drip eaves teahouse

Filter:glow (color= #ffff00, strength=5) after the effect

drip eaves teahouse

It 's like I can kick Photoshop off the side, right? ?


The above is the CSS filter effect (a) _ Basic tutorial content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!


  • 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.