这是由于锚的顶部填充物等于您想要的碎屑的高度。我卸下了填充物,给了包含的列表元素 height:30px;
, ,给锚 line-height:30px;
因此它们保持垂直为中心。
#crumbs ul li {
display: inline-block;
height:30px;
}
#crumbs ul li a { /* The block part of each breadcrumb; the text in each breadcrumb */
display: block;
line-height:30px;
background: #327098;
/*text-align: center; */
padding: 0 10px 0 80px; /* size of each breadcrumb */
position: relative;
margin: 0 5px 0 0;
font-size: 16px;
text-decoration: none;
color: #000000;
}
编辑
我不确定他们分别存在的意思。我只是将您提供的代码复制到小提琴中并运行了。我看到了明显的问题,我竭尽所能。这是我看到的问题。 http://jsfiddle.net/zh6bw/