Home  >  Article  >  Web Front-end  >  Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange

Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:06:421355browse

Pure DIV/CSS couplet floating advertising code (no JS)
Floating on both sides of the source code network. After testing, it is compatible with IE6, IE7, and Firefox browsers.

The CSS code is:

Copy code The code is as follows:

. 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;}


The page code is:
Copy code The code is as follows:

Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange
Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange
 
Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange
 
Multiple browsers compatible with pure DIV/CSS couplet floating ad code without js_Experience exchange
 
div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn