求一个CSS效果 和163首页一样的广告效果:广告慢慢的从网页顶部下拉出来,又慢慢的缩回去。或这个div广告图片显示在网页中央,又慢慢的消失。谢谢各给高手,马上结贴。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 body> <div id="ads" style=" width:620px; margin:auto; display:none; margin-top:25px; height:0px;overflow:hidden; "> <a href="http://www.po-soft.com" target="_blank"><img src="http://www.po-soft.com/images/image1.jpg" alt="百洋软件研究实验室" width="620" height="195" border="0"/></a> </div> <p align="center" style="line-height:24px;">本demo来源于<a href="http://www.po-soft.com/" target="_blank">百洋软件研究实验室</a>博客的<br /> <a href="http://www.po-soft.com/blog/xuan/145.html">JS特效代码大全(二)能记录cookie的顶部伸缩广告</a>一文。</p> </body> </html> <script type="text/javascript" language="javascript"> var time = 500; var h = 0; function addCount() { if(time>0) { time--; hh = h+5; } else { return; } if(h>198) //高度 { return; } document.getElementById("ads").style.display = ""; document.getElementById("ads").style.height = h+"px"; setTimeout("addCount()",30); } window.onload = function showAds() { addCount(); setTimeout("noneAds()",7000); //停留时间自己适当调整 } </script> <script type="text/javascript" language="javascript"> var T = 500; var N = 195; //高度 function noneAds() { if(T>0) { T--; NN = N-5; } else { return; } if(N<0) { document.getElementById("ads").style.display = "none"; return; } document.getElementById("ads").style.height = N+"px"; setTimeout("noneAds()",30); } </script> 拿去试试。 找到了一个合适的,比2楼的好多了..结贴了<html><head><title>163头部ad显示效果</title><script src="jquery-1.3.2.min.js" type="text/javascript"></script> <!--将jQuery引用进来--><script>$(document).ready(function() { $("#ad").slideDown(1000,function(){ var dom = $(this); setTimeout(function(){dom.slideUp(1000);},2000);});});</script><style type="text/css">body {margin:0;padding:0; }div#ad {width:500px;height:400px;font-size:18px; padding:0; margin:0; background-color:#eee; display:none;}/*div#ad p {height:14px;}//这是第一次发布时候p的样式*/div#ad p {height:25px; padding:0;margin:0;line-height:150%;}//这是第二次发布时候p的样式</style></head><body><div id="ad"><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p><p>这是网易163的广告代码</p></div> csacasc</body></html> 请问,在64位win7上用vs.net2010开发的程序,是64位的吗? sql 分页 [求助]关于定期统计的实现 反编译了一个DLL ,求翻译几段查询代码 多语言切换,如何付值数据 访问人数多不能访问是什么原因? 问题没解决,重新提问,在线等,希望能解决 怎样在后台设置图片按钮(快速揭帖) 求助!希望能得到大哥的提供! 高分求助 !!数组组合问题 asp.net 按钮事件获得页面<%for %>循环变量 "Tab鼠标经过事件"已能使用,但能不能改为传参数的?
<div id="ads" style=" width:620px; margin:auto; display:none; margin-top:25px; height:0px;overflow:hidden; ">
<a href="http://www.po-soft.com" target="_blank"><img src="http://www.po-soft.com/images/image1.jpg" alt="百洋软件研究实验室" width="620" height="195" border="0"/></a> </div>
<p align="center" style="line-height:24px;">本demo来源于<a href="http://www.po-soft.com/" target="_blank">百洋软件研究实验室</a>博客的<br />
<a href="http://www.po-soft.com/blog/xuan/145.html">JS特效代码大全(二)能记录cookie的顶部伸缩广告</a>一文。</p>
</body>
</html>
<script type="text/javascript" language="javascript">
var time = 500;
var h = 0;
function addCount()
{
if(time>0)
{
time--;
hh = h+5;
}
else
{
return;
}
if(h>198) //高度
{
return;
}
document.getElementById("ads").style.display = "";
document.getElementById("ads").style.height = h+"px";
setTimeout("addCount()",30);
}
window.onload = function showAds()
{
addCount();
setTimeout("noneAds()",7000); //停留时间自己适当调整
}
</script>
<script type="text/javascript" language="javascript">
var T = 500;
var N = 195; //高度
function noneAds()
{
if(T>0)
{
T--;
NN = N-5;
}
else
{
return;
}
if(N<0)
{
document.getElementById("ads").style.display = "none";
return;
}
document.getElementById("ads").style.height = N+"px";
setTimeout("noneAds()",30);
}
</script>
拿去试试。
<html>
<head>
<title>163头部ad显示效果</title>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<!--将jQuery引用进来-->
<script>
$(document).ready(function() {
$("#ad").slideDown(1000,function(){
var dom = $(this);
setTimeout(function(){dom.slideUp(1000);},2000);
});});
</script>
<style type="text/css">
body {margin:0;padding:0; }
div#ad {width:500px;height:400px;font-size:18px; padding:0; margin:0; background-color:#eee; display:none;}
/*div#ad p {height:14px;}//这是第一次发布时候p的样式*/
div#ad p {height:25px; padding:0;margin:0;line-height:150%;}//这是第二次发布时候p的样式
</style>
</head>
<body>
<div id="ad">
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
<p>这是网易163的广告代码</p>
</div>
csacasc
</body>
</html>