以下代码在 firefox 上运行良好,但在 chrome 上运行不佳:
http://jsfiddle.net/4tYfY/4/
<body>
<div id="footer"><ul>
<li class=""><a href="rolunk">1</a></li>
<li class=""><a href="hotelek">2</a></li>
<li class=""><a href="apartmanok">3</a></li>
<li class=""><a href="impresszum">4</a></li>
</ul>
<div class="clearfix"></div></div>
</body>
.clear, .clearfix{clear:both;}
#footer
{
background-image: url('../images/footerLoopBg.png');
height: 70px;
line-height: 70px;
text-align: center;
vertical-align: middle;
font-family: georgia;
font-size: 1.1em;
width: 100%;
}
#footer ul li
{
display: inline-block;
padding: 0px;
}
#footer ul li a
{
color: #DB9FBD;
}
#footer li:after
{
content: '|';
padding: 5px;
color: #DB9FBD;
}
#footer li:last-of-type:after {
content: "";
}
添加:
#footer ul li { vertical-align: top;}
Demo
我是一名优秀的程序员,十分优秀!