用js实现居中浮动

来源:百度知道 编辑:UC知道 时间:2024/05/20 02:36:44
用js实现居中浮动像对联广告一样.
是弹性浮动的那种
你好。谢谢你给我的答题。但是我要的是居中不是居左。并且要兼容各种分辨率。:)

<body onscroll="moveDiv()">
<div id="divs" style="background-image:url(screenshot1.jpg);background-color:#99ffff;height:140;width:100;left:0;visibility:visible;position:absolute;FILTER: alpha(opacity=0);top:5;z-index:1">
<center>
welcome
welcome
welcome
<br />
<a href=javascript:hiddenDiv()>关闭</a>
</center>
</div>
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
hello<br />
h