DHTML
  Home arrow DHTML arrow Page 5 - Filters And Transitions In IE5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
DHTML

Filters And Transitions In IE5
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    2000-10-31


    Table of Contents:
  • Filters And Transitions In IE5
  • Filtering Out The Good Stuff
  • A Little Transparency
  • Shadow Boxing
  • Putting On Your Mask
  • Scripting Your Filters
  • Into The Blender
  • Revealing The Secret
  • Zig And Zag

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Filters And Transitions In IE5 - Putting On Your Mask
    ( Page 5 of 9 )

    The "mask" filter does exactly what its name suggests - it turns all the transparent pixels within an object into a specific colour and simultaneously takes all the non-transparent pixels in the specified object and turns them transparent. Note, however, that for this filter to work, the specified object must have some transparent pixels - like a transparent GIF or a block of text.

    The following example turns the transparent areas of the image "square.gif" red.
    <html>
    <head>
    </head>
    
    <body>
    
    <img style="filter: mask(color=red)" src="square.gif" border="0">
    
    </body>
    </html>
    


    Alternatively, if you'd like your image to appear in grayscale, you could simply use the "gray" filter to remove all colour information from the image.
    <img style="filter: gray" src="square.gif" border="0">
    
    You could even reverse the colours of the image with the "invert" filter - be warned that most images typically look much uglier after this!
    <img style="filter: invert" src="square2.gif" border="0">
    
    <<< insert image6.gif and image8.gif >>>
    
    And the "chroma" filter comes in handy when you need to make specific colours within an object transparent. Images which are highly compressed or dithered, like JPEG images, typically show poor results with this filter. The code
    <img src="square.gif" border="0" style="filter: chroma(color=red)">
    
    would turn all instances of the colour red within the image transparent.
    <<< insert image9.gif and image10.gif >>>
    
    If you're looking for something a little more unusual, there's the "wave" filter, which performs a wave distortion across the object it's applied to. This works best with images, rather than text - take a look:
    <html>
    <head>
    </head>
    
    <body>
    
    <img style="filter: wave(strength=9, freq=10)" src="face.gif" border="0">
    
    </body>
    </html>
    


    The "strength" attribute of the filter controls the level of intensity of the distortion, while the "freq" attribute controls the number of "waves" that appear in the distorted image.

    The "glow" filter allows you to make your object glow - take a look:
    <img src="face.gif" border="0" style="filter: glow(color=red)">
    
    There's also a new "emboss" filter, which allows you to display an object as a gray embossed texture. Take a look:
    <html>
    <head>
    </head>
    
    <body>
    
    <div style="position: absolute; top:50; left:50; font-family: Arial;
    font-size: 40pt; filter: progid:DXImageTransform.Microsoft.Emboss">
    Who's The Em-boss?
    </div>
    
    </body>
    </html>
    


    This article copyright Melonfire 2000. All rights reserved.

     
     
    >>> More DHTML Articles          >>> More By icarus, (c) Melonfire
     

       

    DHTML ARTICLES

    - Rough Guide To The DOM (part 2)
    - Rough Guide To The DOM (part 1)
    - Filters And Transitions In IE5
    - Understanding Embedded Fonts




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek