Jump to: navigation, search


This article is In Progress.

Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.

Method of css/media_queries


var object = object.filter();

Return Value

Returns an object of type DOM Node


The following example shows how to use the -ms-filter attribute in Internet Explorer 8.

-ms-filter: 'progid:DXImageTransform.Microsoft.MotionBlur(strength=50), progid:DXImageTransform.Microsoft.BasicImage(mirror=1)';

View live example

The following example shows how to use an inline style sheet to set the filter on an image.

<img style="filter:progid:DXImageTransform.Microsoft.MotionBlur(strength=50)
    height="80px" width="80px" alt="cone">

View live example

The following example shows how to use inline scripting to set the filter on an image.

<script type="text/javascript">
function doFilter ()
    // 12 is the dissolve filter.  
    filterFrom.filters.item(0).Transition=12; = "hidden"; = ""; 
<p>Click the image to start the filter.</p>
// Call the function.
<div id="filterFrom" onclick="doFilter()" 
    style="position: absolute; 
        width: 200px; 
        height: 250px; 
        background-color: white; 
        filter: revealTrans()">
<img id="imageFrom" 
    style="position: absolute; 
        top: 20px; 
        left: 20px;" 
<div id="filterTo" 
    style="position: absolute; 
        width: 200px; 
        height: 250px; 
        top: 20px; 
        left: 20px; 
        background: white; 
        visibility: hidden;">

View live example



Windows Internet Explorer 8. The -ms-filter attribute is an extension to CSS, and can be used as a synonym for filter in IE8 Standards mode. When you use -ms-filter, enclose the progid in single quotes (') or double quotes ("). Use commas (,) to separate multiple values, as shown in the Examples section. An object must have layout for the filter to render. A simple way to accomplish this is to give the element a specified height and hasLayout property. The shadow filter can be applied to the img object by setting the filter on the image's parent container. The filter mechanism is extensible and enables you to develop and add filters later. For more information about filters, see Introduction to Filters and Transitions. Not available on the Macintosh platform.


-ms-filter: filtertype1 (parameter1, parameter2,...) | filtertype2 (parameter1, parameter2,...)

See also

Related articles

Media Queries

  • filter

Related pages (MSDN)


This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]