在网页中 经常见到两侧的漂浮广告 效果挺好 不管用户看到网页哪个部分 这部分广告都显示 其实这种效果是很简单的
页面中:
<div class="right1"><img src="#" width="80" height="80" border="0" /></div>
<div class="left1"><img src="#" width="80" height="80" border="0" /></div>
CSS:
.right1
{
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;
}
.left1
{
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;
}
本文介绍了一种在网页中实现两侧漂浮广告的简单布局方法,通过CSS定位实现广告在用户浏览页面时始终保持可见。
535

被折叠的 条评论
为什么被折叠?



