[英]Fixed Menu at the top and a banner
怎样才能不管往下逛都能有固定的菜单在最上面呢? 这是 codesandbox 链接: https://codesandbox.io/s/sample-only-g1svw?file=/src/styles.css:247-357
如果我试试这个 css:
#header {
height: 100vh;
background-size: cover;
background-attachment: fixed;
max-width: 100%;
overflow-x: hidden;
overflow: hidden;
position: relative;
top: 0;
left: 0;
z-index: 9000;
width: 100%;
height: 80px;
background-image: url("https://wallpaperaccess.com/full/2409545.jpg");
}
横幅消失:
#navigator {
top: 0px;
left: 0px;
position: fixed;
z-index: 1000;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.