如何将网页处理成黑白效果
来源:黑白格子网络 点击次数: 发布时间:2013-12-25 13:42:51
要是对滤镜属性的操作 ,为防止自动运行,很多代码前加了“ / ”请去掉
/ <script>
/var timer
/var Opacity = 0
/function hide() {
oDiv.style.display = "block"
oDiv.style.height = document.body.scrollHeight
Opacity = 0
event.srcElement.blur()
timer = window.setInterval("aa()", 5)
}
/ function aa()
{
if (Opacity == 50)
{
window.clearInterval(timer)
oButton.style.display = "block"
return
}
Opacity = ( Opacity + 3 ) > 50 ? 50 : /Opacity + 3
oDiv.style.filter = "Alpha(Opacity=" + Opacity + ")"
}
function bb()
{
if (Opacity == 0)
{
window.clearInterval(timer)
oDiv.style.display = "none"
return
}
Opacity = (Opacity - 3 < 0) ? 0 : Opacity - 3
oDiv.style.filter = "Alpha(Opacity=" + Opacity + ")"
}
/function cc()
{
timer = window.setInterval('bb()', 5);
oButton.style.display='none';
}
</script>
<body topmargin=0 leftmargin=0>
<div id=oDiv style="position:absolute;z-index:99; background-color:darkgray; Filter: Alpha(Opacity=0); border:1px solid #333333;display:none;width:100%;vertical-align:center;text-align:center"> </div>
<button onclick=hide()>hide</button>
<button id=oButton style="position:absolute; /left:100;top:200;z-index:100;display:none" onclick="cc()">确定</button>
<script>
for (var i=0; i<30; i++)
document.write ("<p>123</p>")
/</script>
上一篇: 网页打不开?
下一篇:什么样的网页设计符合大众审美