CSS菜单按钮在点击或悬停时在tom处有随机的浅蓝色边框?
请开始点击按钮,你会注意到每个按钮底部都会出现一个浅蓝色左右的边框 如果将最后一个子项(带有图标的最后一个菜单项)悬停,则无需单击即可发生此情况。 我使用的是引导框架 为什么会这样?很奇怪 这是我的HTML代码:CSS菜单按钮在点击或悬停时在tom处有随机的浅蓝色边框?,css,twitter-bootstrap,Css,Twitter Bootstrap,请开始点击按钮,你会注意到每个按钮底部都会出现一个浅蓝色左右的边框 如果将最后一个子项(带有图标的最后一个菜单项)悬停,则无需单击即可发生此情况。 我使用的是引导框架 为什么会这样?很奇怪 这是我的HTML代码: <header class="container"> <div id="logo"></div> <br /> <div id="menu"> <ul id="menuitems"
<header class="container">
<div id="logo"></div>
<br />
<div id="menu">
<ul id="menuitems">
<li id="menu-active"><a href="#" >HOMEPAGE</a></li></a>
<li><a href="#">PLAY NOW</a></li>
<li><a href="#">COMMUNITY</a></li>
<li><a href="#">HUNGER WIKI</a></li>
<li><a href="#">HIGHSCORES</a></li>
<li><a href="#">HELP</a></li>
<li><div id="login"></div></li>
</ul>
</div>
</header>
问题出在哪里?尝试将
转换计时功能从ease
更改为linear
我认为这是因为渐变图像的动画设置在默认的蓝色渐变上。将垂直对齐设置为“顶部”或“底部”,以避免它们位于基线上时下方的间隙:)@GCyrillus仍然存在happening@JonyKale这是今天关于导航的第二个问题。我建议您访问此聊天室讨论本地化问题。我在那里,所以我愿意帮忙
#menu {
background-image: url("../img/gradient-header.png");
background-repeat: repeat;
width: 100%;
height: 56px;
border: solid 1px #000;
font-weight: bold;
}
#menuitems {
padding: 0;
margin: 0;
float: left;
}
#menuitems li {
background-image: url("../img/gradient-header.png");
background-repeat: repeat;
display: inline-block;
width: 140px;
height: 56px;
float: left;
border-right: solid 1px #44acbf;
border-left: solid 1px #114a56;
line-height: 56px;
text-align: center;
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-ms-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}
#menuitems li:hover {
background-image: url("../img/gradient-1.png");
background-repeat: repeat;
border-right: solid 1px #2b6e81;
cursor: pointer;
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-ms-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}
#menuitems li:last-child:hover {
background-image: url("../img/gradient-menu-login-hover.png") !important;
background-repeat: repeat;
}
#menuitems li:active {
background-image: url("../img/gradient-onClick-menu.png");
background-repeat: repeat;
}
#menuitems li:last-child {
width: 88px;
border-right: solid 0px transparent;
}
#menu-active {
background-image: url("../img/gradient-1.png") !important;
background-repeat: repeat !important;
border-right: solid 1px #2b6e81 !important;
}
#menuitems li:first-child {
border-left: solid 0px transparent;
}
#login {
background-image: url("../img/icon.png");
background-repeat: no-repeat;
margin-left: 32%;
margin-top: 20%;
width: 25px;
height: 21px;
}
#menuitems a {
width: 140px;
height: 56px;
color: #fff;
text-decoration: none;
border-bottom: solid 0px transparent;
border-top: solid 0px transparent;
}
#menuitems a:hover {
text-decoration: none;
border-bottom: solid 0px transparent;
border-top: solid 0px transparent;
}