包含模板用CSS实现跟随滚动条漂浮层 IE不滚动

浏览:798 发布日期:2013/03/17 分类:求助交流 关键字: 模板 包含
包含模板用CSS实现跟随滚动条漂浮层 IE不滚动,
代码我在不是包含模板的情况下测试可以正常随滚动条滚动,放到包含的模板中就不行了,代码:包含文件是用<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 xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title></title>
<meta name="keywords" content="{$seo.seo_keys}" />
<meta name="description" content="{$seo.seo_desc}" />
<link rel="stylesheet" type="text/css" href="__TMPL__public/css/style.css" />
</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: expression(documentElement.scrollTop + "px");/* for IE6 */
overflow:visible;
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>