当前位置:编程学习 > html/css >>

css动态模糊效果

答案:实例效果:请把鼠标放上去看看

第一步:把下面的脚本插入<head>与</head>之间:

<script>
function on(she){
girl=she
move=setInterval("moving(girl)",50)}

function off(she){
clearInterval(move)
she.filters.blur.strength=2 }

function moving(s){
if (s.filters.blur.strength<110)
s.filters.blur.strength+=5
else clearInterval(move)}

</script>

第二步:把下面的脚本插入<body>与</body>之间:

<p><a href=>

style="position:absolute;top:70;left:390;filter:blur(add=1,direction=80,strength=2)"

onMouseOver="on(this)" onMouseOut="off(this)" width="337" height="87" border="0"></a> </p>

上一个:CSS opacity - 实现图片半透明效果的代码
下一个:用CSS让表格返转的代码 IE only

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,