chroma

書式

chroma

対象

div, span, body, button, img, input, textarea, marquee, table, thead, tdtfoot, th, tr要素

継承

-

初期値

-

バージョン

独自プロパティ

対応ブラウザ

Win IE4.0以降

解説

抜きたい色を指定します。タグによってはposition:absoluteで絶対座標を指定する必要があります。以下のパラメータが指定できます。
設定名方法
enabled フィルタ効果スイッチ (0:オフ、1:オン)
color 抜く色

Internet Explorer 4, 5.0と5.5以降でのDirect Xを利用した場合ではフィルタの指定方法が異なります。
バージョン 指定方法
IE4.0〜5.0 filter:chroma()
IE5.5〜 filter:progid:DXImageTransform.Microsoft.Chroma()
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px;
background-image:url(bg.gif);
}
div {
filter:chroma(color=#ff0000);
position:absolute;
top:0px;
left:0px;
width:320px;
height:64px;
background-color:red;
}
--></style>
</head>
<body>
<div>
 ここのブロックがInternet Explorer独自のフィルタが適用されている部分になります。<br>
<img src="rainbow.gif">
</div>
</body>
</html>
実際のサンプルを実行する