該濾鏡作用與Dropshadow類似,也能使對象產生陰影效果,不同的是shadow可產生漸進效果,使陰影更顯真實。其語法結構如下:
選擇器{Filter:shadow(color=顏色值,Direction=數值)}
其中,Color用於設定陰影顏色;Direction用於設定投影方向,取值為0即零度(表示向上方向),45為右上,90為右,135為右下,180為下方,225為左下方,270為左方,315為左上方。
<html>
<head></head>
<body>
<h1 Style="filter:Shadow(color=#808080, direction=135);height=30" align="center">
<font face="楷體_GB2312" color="#0000FF">Shadow濾鏡演示</font>
</h1>
<p align="center"><img Style="filter:Shadow(color=#808080, direction=135)"; src="82b45674271cea33.gif"> </p>
<center><FONT SIZE=+2>下圖無濾鏡</FONT><BR>
<img src="82b45674271cea33.gif"> </center>
</body>
</html>
本文版权:http://www.ndfweb.cn/news-279.html