爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
虚幻显示的图片
虚幻显示的图片
日期:2014-05-18 浏览次数:20441 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>爱易网网页特效演示, 虚幻显示的图片</title> </head> <body onload=setValues()> <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="http://img.aiyiweb.com/mylogo.gif" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/> </span> <span id=ball style="BACKGROUND-COLOR: white; HEIGHT: 150px; POSITION: absolute; TOP: -50px; WIDTH: 150px"></span> </body> </html> <a href="http://www.aiyiweb.com/js/">欢迎访问爱易网JS特效</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:左侧上下移动的图片
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
打车软件“明补变暗补”背后的小算盘
诺基亚依托规模效应 猛攻国际市场空白
小微型IDC云化趋势加剧 云计算未来或现终极模式
一大波智能路由器正在袭来:小米、360、极路由大PK
微软大幅调整Bing在华策略:从高大上到接地气
传搜狗估值12亿美元 与360谈判进入白热化
国美在线叫板京东:李俊涛底气在哪?
170号码扎堆上市:手机话费私人定制时代到来?
戴尔新CEO名单曝光:惠普甲骨文高管在列
推荐阅读
更多>
频繁自杀 折射媒体变革中的媒体人迷茫与压力并存
支付宝全面封杀比特币:充值码淘宝店或遭封禁
华为任正非:家族成员不会成为接班人
高通反垄断案下月有望落定
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
八位知名设计师评iOS7:新鲜但复杂
MIUI,有了它小米就无惧对手
评论:阿里为什么不试着收购一家香港媒体呢
墨迹也要做硬件,工具类应用如何“变异”的
京东终于想明白,这些年错过的财运,都藏在女人的时装下
王建宙解构OTT效劳 中移动重塑飞信平台
苏宁双线同价遇难题:第一个吃螃蟹不轻松
可靠消息称微型针孔偷拍设备拟全面禁止
微软史上最大规模裁员,一半诺基亚员工
打车软件“明补变暗补”背后的小算盘
传谷歌开发者大会发布Android 4.3 并非5.0版本
网络音乐非片面收费 高晓松时间表难完成
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
富士康人事故骚动方寸 不惜血本下注电商