| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 533 人关注过本帖
标题:求高手帮忙改下 改成打开网页自动播放 并且 鼠标放上去就展开的。 谢谢
只看楼主 加入收藏
heizia
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-11-17
结帖率:0
收藏
 问题点数:0 回复次数:0 
求高手帮忙改下 改成打开网页自动播放 并且 鼠标放上去就展开的。 谢谢
html, body {
margin:0;
font-size:12px
}
img {
border:none
}
p {
border-top:5px solid#660000;
padding:40px;
background:#999900;
height:1500px;
margin:0px
}


var showAD = {
curve: function(t, b, c, d, s) {
if ((t /= d / 2)



  


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<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: 'http://img.baidu.com/img/logo-zhidao.gif'
});
</script>
<title>自动伸缩广告</title>
</head>
<body>
<div id="ad_box_2009_04" style="background:BF0008"> <img src="http://img.baidu.com/img/logo-zhidao.gif" id="adImg" /> </div>

</body>
</html>
搜索更多相关主题的帖子: html background function PUBLIC 
2012-12-09 15:24
快速回复:求高手帮忙改下 改成打开网页自动播放 并且 鼠标放上去就展开的。 谢谢 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.044507 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved