[英]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.