<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title>Document</title>
<style>
*{
margin:?0px;
padding:?0px;
}
.par{
width:?1100px;
height:?100px;
margin:?0?auto;
}
.header{
background:?black;
border:?1px?solid?#ccc;
position:?sticky;
top:0;
}
.logo{
z-index:?-1;
}
.nav{
float:?right;
margin-top:?-100px;
min-height:?100%;
}
.li{
float:?left;
line-height:?90px;
text-align:?center;
margin-right:?20px;
color:?#FFF;
}
.con?img{
width:?100%;
height:?100%;
max-width:?100%;
}
.foot{
width:?100%;
height:?80px;
background:?black;
position:?sticky;
bottom:0px;
}
.foot-li{
float:?left;
line-height:?70px;
text-align:?center;
margin-right:?20px;
color:?#FFF;
}
.foot-nav{
left:?350px;
position:?relative;
}
</style>
</head>
<body>
<div>
<!--?頭部內容?-->
<div>
<div>
<img?src="http://climg.mukewang.com/58c0d2d900016ce303000100.png"?alt="圖片掛了">
</div>
<div>
<div>課程</div>
<div>職業路徑</div>
<div>實戰</div>
<div>猿問</div>
<div>手機</div>
</div>
</div>
<!--?中間內容?-->
<div>
<img?src="http://climg.mukewang.com/58c0eda50001e12416000480.jpg"?alt="">
<img?src="http://climg.mukewang.com/58c0edb80001c9f216000480.jpg"?alt="">
<img?src="http://climg.mukewang.com/58c0edc9000100d516000480.jpg"?alt="">
</div>
<!--?腳部內容?-->
<div>
<div>
<div>企業合作</div>
<div>人才招聘</div>
<div>聯系我們</div>
<div>講師招聘</div>
<div>常見問題</div>
</div>
</div>
</div>
</body>
</html>麻煩老師點評下,為什么頭部設了sticky top=0 不能固定,而腳部可以
- 1 回答
- 0 關注
- 1165 瀏覽
相關問題推薦
添加回答
舉報
0/150
提交
取消
