·
网页特效集锦
·
网页工具库
背景按钮
导航特效
图片特效
文本特效
时间特效
状态特效
另类特效
网页制作
网站首页
< 后退
|
收藏网页特效集锦
推荐网页特效
购物网站的导航效果,推荐!
向上下左右滚动图片的特效
超级变态广告代码
设为首页
加入收藏夹
防止选择和复制
新浪博客的提示窗口,推荐!
推荐网页工具
在线html编辑器
在线css编辑器
滚动条颜色生成器
弹出窗口生成器
网页加密解密工具
汉字转换成拼音工具
文本繁简体转换工具
您的位置:
网页特效集锦
>>
网页图片特效
>> 图像虚幻显示特效
查看此特效演示
图像虚幻显示特效
把如下代码复制到<body>与</body>之间
<script language=javascript> <!-- beginning of javascript - var x,y var marginbottom var marginleft=0 var margintop=0 var marginright var cliptop var clipbottom var clipleft var clipright var clippoints var ballheight=150 var ballwidth=150 var imageheight=525 var imagewidth=457 // less is faster var tempo=25 // horizontal move (pixels) within time unit var stepx=12 // vertical move (pixels) within time unit var stepy=6 var timer // check the width and the height of the document // gets the starting position of the ball by random function setvalues() { if (document.all) { marginbottom = imageheight-ballheight marginright = imagewidth-ballwidth document.all.ball.style.posleft=randommaker(400) document.all.ball.style.postop=0 document.all.textcontent.style.posleft=0 document.all.textcontent.style.postop=0 document.all.ball.style.filter="alpha(opacity=0,finishopacity=100,style=2,startx=0px,starty=0px,finishx=100px,finishy=100px)" moveball() } } // randomfunction function randommaker(range) { rand=math.floor(range*math.random()) return rand } function moveball() { checkposition() if (document.all) { document.all.ball.style.posleft+=stepx document.all.ball.style.postop+=stepy cliptop=document.all.ball.style.postop clipbottom=cliptop+ballheight clipleft=document.all.ball.style.posleft clipright=clipleft+ballwidth clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.textcontent.style.clip=clippoints timer=settimeout("moveball()",tempo) } } function checkposition() { if (document.all) { if (document.all.ball.style.posleft>=marginright) { stepx=stepx*-1 document.all.ball.style.posleft-=10 } if (document.all.ball.style.posleft<=marginleft) { stepx=stepx*-1 document.all.ball.style.posleft+=10 } if (document.all.ball.style.postop>=marginbottom) { stepy=stepy*-1 document.all.ball.style.postop-=10 } if (document.all.ball.style.postop<=margintop) { stepy=stepy*-1 document.all.ball.style.postop+=10 } } } // - end of javascript - --> </script> <span id=textcontent style="left: -5000px; position: absolute; top: -5000px"><img border=0 src="computer_windowsxp_01_032.jpg"> </span> <span id=ball style="background-color: white; height: 150px; position: absolute; top: -50px; width: 150px"></span>
修改<body>标签为
使用说明:代码的最后部分的src值为调用的背景图片,可以用你喜欢的图片作为背景。
上一个特效:
小方框中浏览大图
返回列表
下一个特效:
图片大小随鼠标触碰而变化
关于我们
|
联系本站
|
免责声明
|
版权声明
|
网站地图
|
友情链接
|
域名注册
|
网站空间
copyright © 2003~2008
www.xinnew.com
.all rights reserved.