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