我正在为导航链接设置样式,当我将鼠标悬停在链接上时,它会改变颜色,但会在右侧移动几个像素,当光标从悬停状态中移除时,它又会恢复正常。
我的导航 CSS
.logo-wrapper {
padding-bottom: 85px;
background-color: #2e3639;
}
.logo-items{
display: inline-block;
position: relative;
color: white;
font: "Times New Roman";
float: left;
margin-left: 500px;
margin-top: 30px;
text-decoration: none;
}
.logo-items a{
text-decoration: none;
color: white;
margin-left: 10px;
margin-right: 10px;
border-bottom:solid 1px transparent;
}
.logo-items a:hover {
background-color: #61696c;
padding: 4px 4px 4px 4px;
border-radius: 10px;
}
.logo-items span {
margin-right: 10px;
}
我的导航
<div class="logo-wrapper">
<div class="logo-items">
<span>Logo</span>
<span>
<%= link_to "Tags", tags_path %>
</span>
<span>Pages</span>
</div>
</div>