[英]Fixing div navigation from hiding upon scroll
body {
margin: 0px;
width: 100%;
height: 120%;
background: red;
}
#nav {
position: fixed;
width: 100%;
z-index: 99;
height: 25px;
background: blue;
}
使用position:fixed
和z-index
屬性(您的問題歸因於圖層: fixed
div
位於#area
div下):
#nav{
position:fixed;
top:0;
width:100%;
height: 25px;
z-index:50;
background: blue;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.