一个在浏览器底部固定浮动的DIV怎么实现
发布网友
发布时间:2022-04-20 20:18
我来回答
共1个回答
热心网友
时间:2022-04-20 21:47
HTML code<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<style type="text/css">
.shape{width:200px; height: 140px; position:fixed!important; position:absolute; right:5px; bottom:5px!important; bottom:auto; top: expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop+(documentElement.clientHeight - this.clientHeight):document.body.scrollTop+(document.body.clientHeight - this.clientHeight));}
.shape .con{width:200px; height:100px; background: url(http://static.l99.com/skin/default/images/versus/pk_vote_record.gif) no-repeat;}
.shape .btn{width:200px; height:40px; background: url(http://static.l99.com/skin/default/images/versus/pk_vote_record.gif) no-repeat 0 -100px;}
.height{height:1300px;}
</style>
</head>
<body>
<div class="shape">
<div class="con"></div>
<div class="btn"></div>
</div>
<div class="height">
</div>
</body>
</html>