css - 使用 css ul li 显示内联 block 时出现的像素

标签 css html-lists pixel

图像非常不言自明。我无法摆脱只有一个列表元素底部的那两个像素。我在 css 的每个 Angular 落都插入了 text-decoration:none 和 list-style-type none 但没有结果。 原因?

http://s1089.photobucket.com/user/3Joez/media/disp_zps6fe2774c.jpg.html

#rightnav {
float:right;
width:65%;
height:50px;
/*border:2px solid #Df1;*/
}

#rightnav ul {
 margin-left:9.5%;
/*border:1px solid #F30;*/
width:500px;

}

#rightnav ul li {

 display:inline-block;
 font-family:Times New Roman, Times, serif;
 font-size:1.4em;
 margin-left:2%;
 margin-top:1.5%;
 color:#FFF;
 text-decoration:none ;
 list-style:none; 
 list-style-type:none;

最佳答案

很确定你有一个 <a>在你的里面 <li> .您是否更改了上面的文字装饰?在 <li> 上更改它可能不会更改内部样式,因为 UA CSS 可能会将下划线样式绑定(bind)到 <a>标签。

#rightnav ul li a {
  text-decoration:none;
}

关于css - 使用 css ul li 显示内联 block 时出现的像素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18794594/

相关文章:

jQuery队列函数只执行一次

css - 设置 text_field 宽度,样式有效但类无效

ios - 检查用户何时滑过 UIView - touchesMoved 太滞后

C++读取图像像素

swift - 如何在所有 iPhone 设备和模拟器上将 UIView 放置在 UIImage 之上

css - 有没有一种方法可以仅使用 css 在 float 对象上设置动画转换?

c# - 如何检索 html li 值

jquery - 迭代无序列表时跳过第一个列表项。 jQuery

css - 如何将 <ul> <li> 置于 div 中?

css - 在 url ("../(folder-name)/(image-name)"中, "../"代表什么?