0
我在Weebly上有一個網站,其中模板會導致導航菜單在您向下滾動時跟隨您,無論您身在何處都可以看到它。導航菜單妨礙了我的內容,所以如果我可以將它保留在頁面的頂部,這將非常棒。保持導航菜單固定在頁面頂部(Weebly)
我想貼在這裏的代碼,但它沒有正確格式化,所以我會後它的映像:
/* Navigation
--------------------------------------------------------------------------------*/
.nav {
padding: 0 0 0 20px !important;
}
.nav ul{
list-style: none;
float:right;
overflow: hidden;
}
nav ul li {
list-style: none;
float:left;
margin-right:15px;
padding:8px 15px;
height:23px;
}
.nav ul li#active,
.nav ul li:hover {
border:2px solid #fff;
border-radius:4px;
padding:6px 13px;
}
.nav ul li a {
float:left;
display: block;
color:#fff;
text-decoration:none;
text-transform:uppercase;
font-weight: 500;
border: 0;
outline: 0;
list-style-type: none;
font-size:14px;
line-height:23px;
}
#nav-wrap .container ul li#active a,
#nav-wrap .container ul li a:hover {
color: #fff;
background: none !important;
border: 0;
}
.landing-page:before,
.splash-page:before,
.tall-header-page:before,
.short-header-page:before {
content: '';
width: 100%;
height: 130px;
position: fixed;
top: 0;
left: 0;
background: transparent url(‘menu-bg.png‘) left top repeat;
z-index: 1;
}