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