CSS Image Filters in Internet Explorer

By  on  

Internet Explorer provides for some really interesting CSS image effects. Of course, these effects are useless in any other browser (just how Microsoft intended) but they should be used like any other browser-dependent functionality -- used as enhancements only.

Note: Only IE users will see these image effects. Please switch to IE to experience the image effects.

Original Image

Horizontal Flip

.hflip	{ filter:fliph; }

Vertical Flip

.vflip	{ filter:flipv; }

The Wave

.wave { filter:wave(add = 0, freq = 5, lightstrength = 10, phase = 100, strength = 20); }

Frame Fade

.frame	{ filter:alpha(opacity = 100, finishopacity = 0, style = 3, startx = 20, starty = 40, finishx = 0, finishy = 0); }

X-Ray / Inverse

.xray { filter:xray; }

Blur

.blur { filter:blur(add = 0, direction = 300, strength = 10); }

Grayscale

.gray { filter:gray; }

Recent Features

  • By
    Animated 3D Flipping Menu with CSS

    CSS animations aren't just for basic fades or sliding elements anymore -- CSS animations are capable of much more.  I've showed you how you can create an exploding logo (applied with JavaScript, but all animation is CSS), an animated Photo Stack, a sweet...

  • By
    Create a CSS Flipping Animation

    CSS animations are a lot of fun; the beauty of them is that through many simple properties, you can create anything from an elegant fade in to a WTF-Pixar-would-be-proud effect. One CSS effect somewhere in between is the CSS flip effect, whereby there's...

Incredible Demos

  • By
    NSFW Blocker Using MooTools and CSS

    One of my guilty pleasures is scoping out the latest celebrity gossip from PerezHilton.com, DListed.com, and JoBlo.com. Unfortunately, these sites occasionally post NSFW pictures which makes checking these sites on lunch a huge gamble -- a trip to HR's office could be just a click away. Since...

  • By
    MooTools Gone Wild: Element Flashing

    If you're like me and lay awake in bed at night, you've flipped on the TV and seen the commercials: misguided, attention-starved college girls fueled by alcohol ruining their futures by flashing lame camera-men on Spring Break. Why do they do it? Attention...

Discussion

  1. I like the effects, gives you more management to the images which are one of the type of contents that are not available to manipulate in css (including objects{videos, animations…}).

    Sad that IE can give you manipulation in this, but it doesn’t get better in supporting more transparency in png images.

  2. Rob

    Cute, but IE can’t do much of anything else right, so why bother? With every other browser near passing Acid3, while IE8 still struggles with basic properties, you should make an article about the multitude of standard things that can be done on every other browser but doesn’t work on IE.

  3. These are interesting. Don’t forget about DropShadow(color,offX,offY)! Note that this will prevent your CSS from validating but neat effects.

  4. Nice, Just wish IE would support more common image styles like Tony mentioned instead of making their own ones up.
    However saying that IE8 is getting better in CSS support than IE7/6.
    Does anyone know of a way of doing this in FF i wonder?

  5. @pfwd:

    So I think that FF3 was going to have a similar feature called image filters but it got pulled. Maybe FF4?

  6. Dan

    The only way I know of doing it so it works cross-browser is to use 2 separate images and do a rollover, which of course can be done using pure CSS with no javascript (in case user has scripting disabled). Example:

    div#01 //set an id for the div
    {
    height: XXpx; //where XX is your actual dimension
    width: XXpx; //ditto
    background-image: url('image_a.jpg');
    display: block;
    }
    
    div#01:hover
    {
    background-image: url('image_b.jpg);
    }
    
    .hide //define a class for image preload
    {
    display: none;
    }
    

    In your HTML:

    <img src="image_b.jpg" class="hide"> <!-- This preloads the rollover image -->
    <div id="01"></div>
    

    I’ve tried this in IE, Firefox, and Safari and it works in all 3

  7. LookingForCheapSSD

    After 3 years, using IE10, can’t see the flipped images any more. Good to see how MSFT is embracing standards. It would be nice if W3C would have choose these CSS bits as standard. So older websites won’t have to make a change. For the people who bash IE for DX filters, they must know that IE team included these features when nobody was interested in web (back in ’97). Guess they deserve some credit..

  8. thomas

    sadly… all those effects don’t work in IE11 (Windows 7)
    and it seems there are no ways to have blur effect always in IE11…

  9. William

    What versions of IE are you talking about in this article? I tried this in IE 11 and I didn’t get any effects. I did some googling, does this only work on IE 9 or below?

  10. John

    Sorry, but NOTHING of this works in my IE11 on Windows 7. All images look unchanged. You guys do really see effects in IE? (not Edge) What’s wrong on my side?

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!