【发布时间】:2013-09-02 13:26:02
【问题描述】:
我在悬停时在my nav links 上方添加了一个边框/线,但现在每次悬停时它都会将我的文本向下移动。是什么原因造成的?
#nav a:hover{
border-top:solid 4px #3b5998;
color:#b7c3e6;
padding: 6px}
.header-alignment-left.header-navigation-split #topNav{position:absolute; right:-15px}
.logo-image #topNav nav li a{padding:5px 15px; line-height:100%}
#nav a{border-top:0px solid transparent}
#nav .subnav{margin-top:0}
#nav a{border-right:1.5px solid #3b5998; height:20px}
#nav li:last-child a{border-right:0}
#topNav nav .folder ul li a {
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out }
#header #topNav nav .folder ul li{padding:0 24px 12px; position:relative; }
#header{margin-top:20px !important}
#topNav{margin-top:40px}
#nav .subnav ul{padding-bottom:15px !important}
#nav .subnav ul{padding-top:15px !important}
【问题讨论】:
-
减少悬停时的填充,它应该停止移动
-
你不想让它像现在这样希望吗?
-
@ZeroPhase 不,我不希望它移动,当我添加上面的行时它开始移动
标签: css navigation hover