不用js多瀏覽器兼容純DIV/CSS對(duì)聯(lián)漂浮廣告代碼
更新時(shí)間:2007年12月29日 10:24:58 作者:
兩側(cè)漂浮。經(jīng)測(cè)試,兼容IE6,IE7,F(xiàn)irefox瀏覽器
純DIV/CSS對(duì)聯(lián)漂浮廣告代碼(無(wú)JS)
源碼網(wǎng)兩側(cè)漂浮。經(jīng)測(cè)試,兼容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;}
頁(yè)面代碼為:
<div class="r1"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
源碼網(wǎng)兩側(cè)漂浮。經(jīng)測(cè)試,兼容IE6,IE7,F(xiàn)irefox瀏覽器。
CSS代碼為:
復(fù)制代碼 代碼如下:
.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;}
頁(yè)面代碼為:
復(fù)制代碼 代碼如下:
<div class="r1"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="r2"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l1"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
<div class="l2"><a href="http://chabaoo.cn" target='_about'><img src="/js/pic/piao-l-1.gif" width="80" height="80" border="0" /></a></div>
您可能感興趣的文章:
相關(guān)文章
《CSS3實(shí)戰(zhàn)》筆記--漸變?cè)O(shè)計(jì)(三)
這篇文章主要介紹了《CSS3實(shí)戰(zhàn)》筆記--漸變?cè)O(shè)計(jì)(三,需要的朋友可以參考下2016-05-05前端面試學(xué)習(xí)中幾個(gè)常見(jiàn)有用的知識(shí)點(diǎn)
一場(chǎng)疫情過(guò)后,又要經(jīng)歷一次次面試,今天小編給大家分享前端面試學(xué)習(xí)中幾個(gè)常見(jiàn)有用的知識(shí)點(diǎn),非常不錯(cuò),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下2022-12-12Web標(biāo)準(zhǔn)學(xué)習(xí)資源(書(shū)籍、網(wǎng)站)推薦
Web標(biāo)準(zhǔn)學(xué)習(xí)資源(書(shū)籍、網(wǎng)站)推薦...2007-02-02css font縮寫(xiě)總結(jié)附實(shí)例
css 縮寫(xiě)2008-06-06