爱易网
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 浏览次数:20383 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:左侧上下移动的图片
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
Skype周年:与微软联姻到底有没有未来?
总部大楼已换微软Logo:回忆诺基亚的兴衰史
打车App就是下一个团购骗局!?
FB上广告费用昂贵而且效果不及Twitter
搜狐前副总编何毅加盟乐视 任车联网公司CEO
评论:马云的成功建立在什么基础上很值得怀疑
FDD牌照12月将发放 联通电信双4G反击中移动
中电信国际漫游费下调85% 世界杯上网28元/天
百度“全网寻人”面前的互联网信息枢纽价值
推荐阅读
更多>
虚拟运营商们更像三大运营商的“二道贩子”
170号码扎堆上市:手机话费私人定制时代到来?
小微型IDC云化趋势加剧 云计算未来或现终极模式
Facebook财报前瞻:投资者仍信心不足
评论:马云的成功建立在什么基础上很值得怀疑
刘强东向总理建言:打击有组织有规模的售假商家
“组合拳”怎么打 拆解小米新玩法
承载京东C2C野心的拍拍网:梦想丰满,现实骨感
二维码支付大战的号角注定已经吹响,尚需标准发放
只有切到刚需痛点,漫画APP才能走下去
易迅大众点评缩水执行“七天后悔权”被约谈
传苹果已告知鸿海:两款新iPhone下月发货
苹果大中华区业绩回暖 中移动贡献或低于预期
京东联席董事长赵国庆上市前夕离职
电话用户9月实名制:运营商监管受质疑
苹果iWatch或使用量产液态金属 将取代玻璃
中电信率先推移动转售业务 中下旬批量上市
互联网金融一周年:余额宝最接地气,比特币最作死
马云寄厚望于物流 “菜鸟”行情暂难持续
电信设备商淘金中国4G:华为中兴领衔