爱易网
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 浏览次数:20456 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效观止|www.jscode.cn| --- 图像圆形虚幻显示特效</title> </head> <body onload=setValues()> <center> <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://www.jscode.cn/JsCode/images/c0407.jpg"> </span> <span id=ball style="BACKGROUND-COLOR: white; HEIGHT: 150px; POSITION: absolute; TOP: -50px; WIDTH: 150px"></span> </center> </body> </html> <a href="http://www.aiyiweb.com/js/">欢迎访问爱易网JS特效</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:跟随鼠标弹性效果的运动图片
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
空气污染器市场乱象丛生 选购需慎重
首个释放出搅局房地产信号的互联网公司不是小米而是58同城
玩游戏式的趣味戒烟App:Kwit
传运营商高层将变化 专家称需体制革新
“宽带中国”计划已正式上升为国家战略
欧盟控诉苹果在爱尔兰非法进行税收交易
百视通:Xbox One汉化获批 游戏迷欢呼吧
iPhone5S组件曝光 印证杀手级功能存在
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
推荐阅读
更多>
传360周鸿祎曾试图阻止百度收购91无线
欧洲6万人起诉Facebook隐私侵权
“论文查重”网店一月收入竟过百万
一大波智能路由器正在袭来:小米、360、极路由大PK
传陌陌或12月赴美IPO 估值约30亿美元
国美在线叫板京东:李俊涛底气在哪?
美剧讲硅谷创业者:远不及现实荒诞?
微信今天大面积崩溃 腾讯:因光缆施工被挖断
估值增长9.8% 阿里IPO前市值达2450亿美元
PC迎9年来出货量新低 平板电脑渐成主流
说说这一个月的赌球输了多少
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
摩托罗拉移动裁员关闭德州Moto X手机工厂
携程整合去哪儿陷入僵局 欲联手老对手艺龙
马云的SNS之梦有了新目标 收购“微博”
在线音乐出现“小米公司”不是没有可能
Docker Desktop 4.11 发布:支持虚拟桌面、Mac 权限更改和新扩展
金山毒霸安全中心: XP退役后首个高危漏洞来了
北京今日实现用支付宝钱包为公交卡充值
苹果联合创始人炮轰鲍尔默“一直都在吃老本”