css filter

 <style>
#idParentDIV
{width:100%;height:80px;padding:6px;background-color:buttonshadow;}
#idDIV
{width:80%;height:40px;background-color:#FF6633;color:#FFFFFF;padding:6px;}
#idCodeDiv
{width:80%;padding:4px;font-family:verdana,tahoma;margin:12px 0px 0px 0px;background-color:#EEEEEE;font-weight:bold;}
</style>

 

 

<script>
function rdl_change(e){
var oCodeDiv=document.all("idCodeDiv");
var oDiv=document.all("idDiv");
with (document.all("idSel")) var sValue=options[selectedIndex].value;
oDiv.style.filter
=sValue;
oCodeDiv.innerText
="filter : "+sValue+";";
}
</script>

 

 

<div id=idParentDIV><div id=idDIV><img src="images/rdl_clock.jpg" width=78 height=60 style="float:left;" hspace=4>请从下方选择我的<b> filter </b>值。</div></div>
<br>
<select id="idSel" onchange="rdl_change();">
<option value="">---filter---
<option value="invert()">invert()
<option value="flipV()">flipv()
<option value="flipH()">flipH()
<option value="gray()">gray()
<option value="xray()">xray()
<option value="wave(phase=90)">wave(phase=90)
</select>
<br>
<div id=idCodeDiv>filter : ;</div>

div{
filter
: shadow(color=#0000FF,direction=45); width: 150; color: FF0000
}
这就是一个filter的css示例。只需要用到div上即可看到样式

posted on 2010-07-14 14:00  jianshaohui  阅读(219)  评论(0编辑  收藏  举报

导航