显示一个大图广告,过几秒钟缩回去再显示一个小图。如何实现? 有点像咱们现在CSDN这个页面这样(就是这个帖子顶上),先显示一个大图的广告,延时几秒或者收缩上去,然后重新显示一个小图。我想要的是像网易印象派那种(http://yxp.163.com/) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 咱们CSDN的效果这里可以看到http://topic.csdn.net/t/20050619/03/4091853.html但我说的是网易印象派这种:http://yxp.163.com/ jquery + div吧动画效果可以用jquery实现,放大缩小用div很简单,弄个setTimeout就可以 http://bbs.blueidea.com/viewthread.php?tid=2932364&page=1&authorid=498332看这个 <body onload="run();"><div id="box" style="width:900px;margin:0 auto;height:400px;background:#F39;"></div><script>cout = 400 ;function run(){ var id = document.getElementById('box'); id.style.height = cout +"px"; cout -= 5 ; if(cout>100){ setTimeout(function(){ run(); },10); }}</script> 写了下哦<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><style>body{}#big{ width:960px; margin:0px auto;}#aa{ overflow:hidden;height:408px;}#bb{ width:100%;height:500px; background:#CCCCCC;}</style><script language="javascript">function hidden(){ var a=408; var oheight=document.getElementById("aa"); hide=function (){ if(a>5){ a-=5; oheight.style.height=a+"px"; } else{ clearInterval(b); show=function(){ if(a<46){ oheight.getElementsByTagName("img")[0].src="http://st2.yxp.126.net/img/index/n-p.jpg?v=5242929246100427"; a+=1; oheight.style.height=a+"px"; } else clearInterval(c); } var c=setInterval(show,25); } } var b=setInterval(hide,25);}</script></head><body onload="hidden()"><div id="big"><div id="aa"><img src="http://st.yxp.126.net/img/index/b-n-p.jpg?v=5242929246100427"></div><div id="bb"></div></div></body></html> 关于在FF下获取iframe里面的dom元素对象 当input中属性name的定义和事件名相同时无法调用到事件 请教js鼠标右键禁止问题--在线请教 JS怎么改变每个TD的背景呢???? 如何获得多项列表框的值? Ext.data.Store的reader为啥读不出数据 如何把iframe里得值传到父叶面上去? 如何实现CHINA-PUB上的书评展开效果 求救,急需,怎样校验form中的输入全为数字? Extjs4整合echarts问题 关于文本切割 ExtJs获取后台返回值的问题
动画效果可以用jquery实现,放大缩小用div很简单,弄个setTimeout就可以
看这个
cout = 400 ;
function run(){
var id = document.getElementById('box');
id.style.height = cout +"px";
cout -= 5 ;
if(cout>100){
setTimeout(function(){
run();
},10);
}
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
body{}
#big{ width:960px; margin:0px auto;}
#aa{ overflow:hidden;height:408px;}
#bb{ width:100%;height:500px; background:#CCCCCC;}
</style>
<script language="javascript">
function hidden(){
var a=408;
var oheight=document.getElementById("aa");
hide=function (){
if(a>5){
a-=5;
oheight.style.height=a+"px";
}
else{
clearInterval(b);
show=function(){
if(a<46){
oheight.getElementsByTagName("img")[0].src="http://st2.yxp.126.net/img/index/n-p.jpg?v=5242929246100427";
a+=1;
oheight.style.height=a+"px";
}
else
clearInterval(c);
}
var c=setInterval(show,25);
}
}
var b=setInterval(hide,25);
}
</script>
</head><body onload="hidden()">
<div id="big">
<div id="aa"><img src="http://st.yxp.126.net/img/index/b-n-p.jpg?v=5242929246100427"></div>
<div id="bb"></div>
</div>
</body>
</html>