DIV高度100%和透明的写法

<!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"
/>
<style>
/*zishu.cn*/
*{ margin:0; padding:0;}
body{ height:100%;}
#yin{ width:100%; background: #FF6633; position:absolute; left:0;
right:0; top:0; bottom:0; -moz-opacity:0.5;
filter:alpha(opacity=50);z-index:99; height:100%; }
</style>
</head>
<body>
<img
src="/XHTML/UploadFiles_7249/200610/20061019083704214.gif"
alt="" />
<div id="yin"></div>
</body>
</html>

-----------------------------------------------------------------------------------------------

这里边必须设置:body{ height:100%;}

这个在IE6和IE7和FIREFOX都测试过;


文章来自: 本站原创
引用通告地址: http://www.is21.cn/trackback.asp?tbID=122
Tags:
评论: 0 | 引用: 0 | 查看次数: 2685
发表评论
你没有权限发表留言!