不用js多瀏覽器兼容純DIV/CSS對聯(lián)漂浮廣告代碼
更新時間:2007年12月29日 10:24:58 作者:
兩側漂浮。經(jīng)測試,兼容IE6,IE7,F(xiàn)irefox瀏覽器
純DIV/CSS對聯(lián)漂浮廣告代碼(無JS)
源碼網(wǎng)兩側漂浮。經(jīng)測試,兼容IE6,IE7,F(xiàn)irefox瀏覽器。
CSS代碼為:
.r1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);right:20px;}
.r2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);right:20px;}
.l1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);left:20px;}
.l2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);left:20px;}
頁面代碼為:
<div class="r1"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
源碼網(wǎng)兩側漂浮。經(jīng)測試,兼容IE6,IE7,F(xiàn)irefox瀏覽器。
CSS代碼為:
復制代碼 代碼如下:
.r1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);right:20px;}
.r2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);right:20px;}
.l1{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:200px;
position:absolute; z-index:300; top:expression(offsetParent.scrollTop+200);left:20px;}
.l2{width:80px;height:80px;background:red;float:right;
position:fixed !important; top/**/:300px;
position:absolute; z-index:400; top:expression(offsetParent.scrollTop+300);left:20px;}
頁面代碼為:
復制代碼 代碼如下:
<div class="r1"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="http://www.fzitv.net" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
相關文章
用<TABLE>語句來實現(xiàn)圓角表格可以省去制作圓角圖片之苦!
用<TABLE>語句來實現(xiàn)圓角表格可以省去制作圓角圖片之苦!...2007-04-04

