Академический Документы
Профессиональный Документы
Культура Документы
Home
Computer Basics
MS Office
Programming Languages
Web Programming
Open Source
Verse to Remember!
Proverbs 21:31
Reources for Preparing the Subject - COA Previous Year Question Paper on COA Frequently Asked Questions on PHP & Python Previous Year Question Paper on Open Source Software Do you know the Basics of PHP and Python? Developing Applications with Python Learning More on Operators in PHP Using Operators and Expressions in PHP Various Types of Scope of Variables in PHP Fundamentals of PHP Programming
Total Pageviews
31,525
Blog Archive
2013 (29) 2012 (10) 2011 (97) December (11) November (28) Storing and Retrieving Strings in C
www.futureforyou.net/2011/11/applying-filters-and-transition-in.html
1/3
5/17/13
chromaImg.filters(chroma) = true;
In this example, if the picture named trans.gif has a portion with a color blue, then that part of the image will be made transparent so that the element at the back of the image will be visible through that image. Mask Filter: Mask filter allows an element of a web page to be displayed with a solid background and a transparent foreground. Mask filter has a property called color, which specifies the color of the solid background to the masked image or text. The foreground will have the transparency effect. Example for the code that applies mask effect to a text displayed on an image using <div> element is as follows: <body> <h1> Mask Filters </h1>
Adding Shadow to a Text: Shadow filter adds depth to your text in order to create a shadowing effect that gives a threedimensional appearance to the text. To apply shadowing effect to some text in a web page, apply the shadow filter to the text with values assigned to its direction and color properties. The direction property of the shadow filter determines in which direction the shadow effect is applied this can be set to one of eight directions expressed in angular notation 0 (up), 45 (above-right), 90 (right), 135 (below-right), 180 (below), 225 (below-right), 270 (left) and 315 (above-right). The color property specifies the color of the shadow of the text. To get the shadowing effect fully, we need to set another style called padding. Increasing the padding value from 0 to 100 provides greater distance between the text and the border of the element, allowing the full effect to be displayed. The following is an example code for applying shadowing effect to a header element in a web page: <h1 id = ShadowText style = position: absolute; top: 25; left: 25; Padding: 10; filter: shadow(direction = 45, color = red)> A Heading with Shadow </h1> Creating Gradients with Alpha filter: Gradient is an effect that can be applied to an image to make it transparent to its background in three different styles: Linear, Circular and Triangular. Linear gradient applies transparency effect to an image gradually from one end to the other horizontally. Circular gradient gives the transparency effect from the centre of the image as a circle which gradually fades away as it enlarges. Triangular gradient gives the transparency effect in triangular form. A picture is considered as a rectangle formed using four triangles. Each triangular area has transparency effect which is very less at the top and gradually increases more towards bottom. This kind of effect can be applied with the help of three properties of the alpha filter. They are: Style , Opacity and FinishOpacity.
About Me
Da vi d Li vi ngston J A software professional turned academician. Is an assistant professor in computer science engineering, teaching egineering students in colleges affiliated to Anna University. Has expertise in client server programming,web programming and enterprise computing. Has been guiding students to real time projects. This is a platform through which he shares his knowledge gained over the years to benefit students who want
www.futureforyou.net/2011/11/applying-filters-and-transition-in.html
2/3
5/17/13
Alpha filter can be applied to the div element, which acts as a container to an image in a web page. The style property determines in what style the opacity is applied: a value of 0 applies uniform opacity, a value of 1 applies a linear gradient, a value of 2 applies a circular gradient and a value of 3 applies a rectangular gradient. The Opacity and FinishOpacity properties are both percentages that determine at what percentage the specified gradient starts and finishes, respectively. The following lines of code illustrate the application of this filter to an image placed on a div element of a web page: <body> <div id = pic style = position: absolute; left: 0; top: 0; filter: alpha(style = 2, opacity = 100, finishopacity = 0> <img src = flag.bmp alt = flag/> </div> </body> Creating Motion with Blur: The blur filter creates an illusion of motion by blurring text or images in a certain direction. It has three properties: add, direction and strength, the values of which specify the attributes of the blurring effect. The add property, when set to tree adds a copy of the original image over the blurred image, creating a more clear blurring effect. The direction property determines in which direction the blur filter is applied. This is expressed in any one of the eight angular vales (0, 45, 90, 135, 180, 225, 270 and 315). The strength property determines how strong the blurring effect is. The following code implements such effects to a header line placed in a div element (block): <body> <div id=blurText style=position: absolute, left: 150, top: 150, padding: 0; filter: blur(add=1, direction=35, strength=50) back ground-color: white> <h1> This is a header with Blurred effect </h1> </div> </body>
Leave a Reply
E n t e ry o u rc o m m e n t . . .
Future for You Network! 2011 FutureForYou Network. Supported by W3G Team and FutureForYou.in
www.futureforyou.net/2011/11/applying-filters-and-transition-in.html
3/3