我花了一些时间将导航栏放在标题上方,并使其分散在Boy Full of Books上博客的宽度
但是,我有两个问题。主要问题在博客上很明显-所选标签的背景溢出到页面上,而与导航栏的其余部分不一致。另一个问题不是我担心的问题,但是如果有人有任何指导,那就太好了。缩小或放大时,导航栏中的页面选项卡不会随页面大小调整。
下面是我的代码(这不是很好,我知道,我仍然是新手):
.PageList {
text-align:center !important;
width: 100%;
}
.PageList ul {
margin-top: -42px;
margin-bottom: 0px;
margin-left: -20px;
background-color: #424242 !important;
width: 100%;
}
.PageList li {
display:inline !important;
float:none !important;
font-size: 61.5px;
margin-left: 0px;
font-family: 'Verdana', Arial, sans-serif !important;
width: 100%;
}
.PageList a {
padding-left: 10px;
padding-right: 10px;
transition: background-color 0.5s ease;
color: #FFFFFF;
text-decoration: none !important;
width: 100%;
}
.PageList a:hover {
background-color: #aeadad;
width: 100%;
}
.PageList li.selected {
background-color: #aeadad !important;
text-decoration: none !important;
margin-bottom: -20px !important;
overflow: hidden;
}
最佳答案
1。
代替
.PageList li.selected{
background-color: #aeadad !important;
text-decoration: none !important;
margin-bottom: -20px !important;
overflow: hidden;
}
至
.PageList li.selected a {
background-color: #aeadad !important;
text-decoration: none !important;
margin-bottom: -20px !important;
overflow: hidden;
}
使用https://developer.mozilla.org/es/docs/CSS/Media_queries
关于html - Blogger中的所选页面标签背景溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30624750/