为什么我的红色盒子无法实现像小关闭按钮不动效果,我的代码是这样的。
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>overflow失效妙用</title>
<style type="text/css">
body{background:#ccc;}
.con{width:80%;height:1000px; background:#6CF; margin:0 auto;}
.h0{height:0px;}
.ovh{overflow:hidden;}
.tr{text-align:right;}
.box{width:48px; height:48px; background:#f00;}
.abs{position:absolute;}
.ml10{right:0px;}
.mt30{top:0px;}
</style>
</head>
<body>
<div class="con">
<div class=" h0 0vh tr "> <div class="box abs ml10 mt30" />
</div>
</div>
</body>
</html>