热门源码
|
热门软件
|
高级搜索
|
网站地图
|
文章
·
软件投稿
免费收录你的网站,现在加入广捷居!
庆祝Admin5·站长网广告联盟开通,抢先注册中.
CSS代码在线格式化、美化工具
首页
站长资讯
源码下载
素材图库
脚本特效
电子书籍
专题
开源者社区
智能模糊搜索
资源名称检索
本站推荐
:
共享世纪推荐的2010·互联网建站品牌CMS
Windows/Linux高性能主机
2G 155元,3G 198元,5G 300元,欢迎联系本站站长选购!
新蛋网顶部展开收缩后再展开的广告效果
脚本类别:
综合技巧
添加时间:
2010-01-26
查看次数:
作者:
脚本代码
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <style> html,body{margin:0;font-size:12px}img{border:none}p{border-top:5px solid#660000;padding:40px;background:#999900;height:1500px;margin:0px} </style> <script> var showAD = { curve: function(t, b, c, d, s) { if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; return c / 2 * ((t -= 2) * t * t + 2) + b }, fx: function(from, to, playTime, onEnd) { var Me = this, who = this.adWrap, position = 0, changeVal = to - from, curve = this.curve; playTime = playTime / 10; who.style.overflow = 'hidden'; function _run() { if (position++<playTime) { who.style.height = Math.max(1, Math.abs(Math.ceil(curve(position, from, changeVal, playTime)))) + "px"; setTimeout(_run, 10) } else { onEnd && onEnd.call(Me, to) } }; _run() }, init: function(info) { var Me = this, loadImg = new Image; loadImg.src = info.endImgURL; window.onload=function() { Me.endImgURL = info.endImgURL; Me.img = document.getElementById(info.imgID); Me.adWrap = document.getElementById(info.adWrapID); var max = Me.img.height; setTimeout(function() { Me.fx(max, 0, 500, function(x) { this.img.src = this.endImgURL; this.curve = function(t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b } else if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b } else if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b } }; this.fx(0, this.img.height,600) }) }, info.timeout || 1000) }; } }; showAD.init({ adWrapID: 'ad_box_2009_04', imgID: 'adImg', endImgURL: '/Pri_upfile/jspic/2010/a.jpg' }); </script> </head> <body> <div id="ad_box_2009_04" style="background:BF0008"> <img src="/Pri_upfile/jspic/2010/b.jpg" id="adImg" /> </div> <p>新蛋是啥</p> </body> </html>
loading...
当前页面所处路径为
共享世纪
/
脚本特效
/
综合技巧
/ ,本特效的Tag为:
共享世纪
新蛋网顶部展开收缩后再展开的广告效果
会员登陆
close X
用户名
密 码
验证码