filter: gray();

Browser
  • IE
Type
  • Extension

The gray filter display the element in the gray scale.


#example {
filter: gray();
}

Example

The original

<img src="image/friend.gif" alt="IMG" width="170" height="140">

Output
IMG

<div style="font: bold 170% sans-serif; color: red; width: 100%;">
Example text
</div>

Output
Example text
The gray scale effect

<img src="image/friend.gif" alt="IMG" width="170" height="140" style="filter: gray();">

Output
IMG

<div style="font: bold 170% sans-serif; color: red; width: 100%; filter: gray();">
Example text
</div>

Output
Example text