?
This document uses PHP Chinese website manual Release
filter:<filter>+
適用于:所有元素
繼承性:無
動畫性:是
計算值:指定值
<filter>:要使用的濾鏡效果。多個濾鏡之間用空格隔開。
最常用的濾鏡效果是不透明效果,如果要實現(xiàn)50%的不透明度(其它高級瀏覽器的實現(xiàn)參閱opacity):
示例代碼:
div{filter:alpha(opacity=50);} /* for IE8 and earlier */ div{opacity:.5;} /* for IE9 and other browsers */
以上2段代碼的效果相同
對應的腳本特性為filter。
Values | IE |
---|---|
Basic Support | 6.0-9.0 |
10.0-11.0 |
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>filter_CSS參考手冊_web前端開發(fā)參考手冊系列</title> <meta name="author" content="Joy Du(飄零霧雨), dooyoe@gmail.com, www.doyoe.com" /> <style> body{background:#090;} div{width:200px;height:80px;margin-top:20px;border:10px solid #000;background:#ddd;} .test{filter:alpha(opacity=30);} .test2{filter:blur(strength=50) flipv();} </style> </head> <body> <div class="test">透明度為30%的box</div> <div class="test2">模糊和翻轉的box</div> </body> </html>
點擊 "運行實例" 按鈕查看在線實例