shadow

書式

shadow

対象

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

継承

-

初期値

-

バージョン

独自プロパティ

対応ブラウザ

Win IE4.0以降

解説

シャドウフィルタ効果を指定します。タグによってはposition:absoluteで絶対座標を指定する必要があります。以下のパラメータが指定できます。

設定名方法
enabled フィルタ効果スイッチ (0:オフ、1:オン)
color 影の色
direction 角度 (45度単位)
strength 強さ (1〜255)

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