欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

對(duì)網(wǎng)頁(yè)中層的固定實(shí)現(xiàn)代碼

  發(fā)布時(shí)間:2011-11-06 14:03:47   作者:佚名   我要評(píng)論
前幾天在對(duì)網(wǎng)頁(yè)頁(yè)面進(jìn)行布局的時(shí)候,遇到一個(gè)需要將網(wǎng)頁(yè)的最下面一個(gè)層固定起來(lái),不隨網(wǎng)頁(yè)的滾動(dòng)條滾動(dòng),添加減少瀏覽器的菜單也不會(huì)變動(dòng)的需求
對(duì)于DIV+CSS不熟悉的我,為此加班加點(diǎn)在項(xiàng)目上線時(shí)把問(wèn)題解決了。參考代碼如下:

復(fù)制代碼
代碼如下:

<!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="GBK"/>
<title>固定上下層的位置</title>
<style type="text/css">
<!--
body {
background-image: url(0);
background-attachment: fixed;
}
#BottomNav {
background: #9F6;
z-index: 999;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
position:fixed;
top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);
overflow: visible;
}
#topNavWrapper {
height: 30px;
margin: 0px auto;
width:100%;
z-index:100;
position:fixed ;
top:0px;
left:0;
background: #9F6;
}
#center
{
width: 100%;
height:100%;
padding-top:30px;
padding-bottom:30px;
}
-->
</style>
</head>
<body>
<div id="topNavWrapper">固定懸浮導(dǎo)航在此處,不隨滾動(dòng)條的滾動(dòng)變化</div>
<div id="center">
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
<p>我是中間層</p>
</div>
<div id="BottomNav">固定懸浮導(dǎo)航在此處,,不隨滾動(dòng)條的滾動(dòng)變化</div>
</body>
</html>

相關(guān)文章

最新評(píng)論