代码我在不是包含模板的情况下测试可以正常随滚动条滚动,放到包含的模板中就不行了,代码:包含文件是用<include file="Public:header" />
html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xm
<head>
<me
<me
<ti
<me
<me
<li
</head>
<body>
<div id="head">
<div class="head" id="test1">
</div>
</div>
css代码
html,body{width:100%; padding:0; margin:0;}
*{ margin:0px; padding:0px;font-family:"宋体"; font-size:13px; color:#000000;}
#head{
width:100%;
height:39px;
float:left;
margin-top:-16px;
}
.head{
width:100%;
height:39px;
float:left;
margin:0px;
background:#000;filter:alpha(opacity=50); /* IE */ -moz-opacity:0.5; /* Moz + FF */ opacity: 0.5;
z-index:998;position:absolute;
padding:0px; border-bottom:2px solid #ff0000;
}
#test1{
z-index:999;
position:fixed;
top:0px;
_position:absolute; /* for IE6 */
_top: ex
overflow:visible;
}
最佳答案