Code for a Header Banner That Slides Down and Retracts After a Few Seconds

We often see large sites, during holidays or promotions, slide the whole page down and show a banner image at the very top, which slowly retracts after a few seconds. This is actually easy to do. The idea: put a div at the very top of the page with an initial height of zero so it stays hidden; once the page finishes loading, run a script that slowly increases the div’s height, holds for a few seconds, then shrinks it. Below is the code — you can copy it directly into an HTML file and run it.

[code lang=“html”] http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=“http://www.w3.org/1999/xhtml”> 头部公告

<img src=“http://www.neilren.com/gonggao/img/gonggao.jpg” width=“980” height=“250” border=“0”/>
页面内容
公告图片规范:宽度980px 高度:250px [/code]

Just copy it and it works. Because of the syntax-highlighting plugin, the image link seems a bit off — I wrote src=“http://www.neilren.com/gonggao/img/gonggao.jpg” but it shows up as an tag.