延續濾鏡效果的整理,本頁示範光暈、遮罩、陰影、X 光、漸層、像素化與透明度等寫法。以下效果多屬 IE 專屬的 filter 語法。
<div style="filter:glow(color='#0000ff', strength='3');
width:100px; height:100px;">
<br/>
strength:光的強度,0–100;此時不能設 DIV 背景色。
</div>
<div style="filter:mask(color='#ff0000'); width:100px; height:100px;
text-transform:uppercase; color:black;">
<br/>
沒有明顯效果,不能設背景色。
</div>
<div style="filter:shadow(color='#0000ff', direction='100');
width:100px; height:100px;">
<br/>
abcdefghijklmn
</div>
<div style="filter:Xray; width:100px; height:100px; background-color:red;"> <br/> sfasdfasdfasdfsadf </div>
<div style="filter:progid:DXImageTransform.Microsoft.Gradient(
GradientType=100, StartColorStr='#B5CCFA', EndColorStr='#ffffff');
width:100px; height:100px;">
漸變效果。
<br/>
endendendendend
</div>
<div style="filter:progid:DXImageTransform.Microsoft.Pixelate(maxsquare=5);
width:100px; height:100px;">
lsksalsslalalalalalalal
</div>
<div style="filter:alpha(opacity=100, finishOpacity=0, style=2);
width:100px; height:100px; background-color:yellow;">
</div>
提醒:這些 filter 語法為 IE 特有,其他瀏覽器不會理會;跨瀏覽器實作相同視覺時,請改用 CSS3 的 box-shadow、linear-gradient、opacity 等標準屬性。