点击这里使用RSS订阅本Blog: rel="alternate" href="http://feed.feedsky.com/softwave" type="application/rss+xml" title="RSS 2.0" />
<script language="javascript">
</script> <script language="javascript" src="http://www.feedsky.com/jsout/publishlist_v2.js?burl=softwave&out_html=true"></script>
163网易顶部动态展开的广告效果
转自http://bbs.blueidea.com/thread-2773857-1-1.html,演示效果请参见这里
<!
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 >
< title > 像163网站顶部展出的大幅广告-wsoul.net </ title >
< script type ="text/javascript" language ="javascript" >
var time = 500;
var h = 0;
function addCount()
{
if(time>0)
{
time--;
h = h+5;
}
else
{
return;
}
if(h>500) //高度
{
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 = 500; //高度
function noneAds()
{
if(T>0)
{
T--;
N = 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 >
</ head >
< body >
< form id ="form1" runat ="server" >
< div id ="ads" style ="margin:auto; display:none; width:900px; top:0px; height:0px; border:solid 1px #000; background-color:#fafafa; overflow:hidden; text-align:center;" >
< img src ="http://gg.blueidea.com/desk/2007/004.jpg" width ="900" height ="500" alt ="" />
</ div >
< div style ="margin:auto; width:900px; height:200px; border:solid 1px #000; background-color:#fafafa; text-align:center;" >
网站主体内容
</ div >
</ form >
</ body >
</ html >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head >
< title > 像163网站顶部展出的大幅广告-wsoul.net </ title >
< script type ="text/javascript" language ="javascript" >
var time = 500;
var h = 0;
function addCount()
{
if(time>0)
{
time--;
h = h+5;
}
else
{
return;
}
if(h>500) //高度
{
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 = 500; //高度
function noneAds()
{
if(T>0)
{
T--;
N = 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 >
</ head >
< body >
< form id ="form1" runat ="server" >
< div id ="ads" style ="margin:auto; display:none; width:900px; top:0px; height:0px; border:solid 1px #000; background-color:#fafafa; overflow:hidden; text-align:center;" >
< img src ="http://gg.blueidea.com/desk/2007/004.jpg" width ="900" height ="500" alt ="" />
</ div >
< div style ="margin:auto; width:900px; height:200px; border:solid 1px #000; background-color:#fafafa; text-align:center;" >
网站主体内容
</ div >
</ form >
</ body >
</ html >
<script type="text/javascript" src="http://www.google.com/reader/ui/publisher.js"></script> <script type="text/javascript" src="http://www.google.com/reader/public/javascript/user/00697638153916680411/state/com.google/broadcast?n=5&callback=GRC_p(%7Bc%3A%22green%22%2Ct%3A%22%5Cu8FD9%5Cu4E9B%5Cu6587%5Cu7AE0%5Cu4E5F%5Cu503C%5Cu5F97%5Cu4E00%5Cu770B%22%2Cs%3A%22false%22%7D)%3Bnew%20GRC"></script>