【发布时间】:2011-08-26 03:57:50
【问题描述】:
我正在尝试消除 Chrome 和 IE9 中每个图像出现的细边框。 我有这个 CSS:
outline: none;
border: none;
使用 jQuery,我还在每个图像标签上添加了 border=0 属性。但是如图所示的边框仍然出现。有什么解决办法吗?
body {
font: 10px "segoe ui",Verdana,Arial,sans-serif, "Trebuchet MS", "Lucida Grande", Lucida, sans-serif;
}
img, a img {
outline: none;
border: none;
}
.icon {
width: 16px;
height: 16px;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
background-position: -48px -144px;
background-image: url(theme/images/ui-icons_0078ae_256x240.png);
margin-right: 2px;
display: inline-block;
position: relative;
top: 3px;
}
<h1>Dashboard <img class="icon" border="0"></h1>
见附件截图:
【问题讨论】:
-
"但仍然出现如图所示的边框。"有截图吗?
-
我不完全确定我看到了实际问题。您的屏幕截图在 Dashboard 一词下显示了一些破折号,但这些破折号看起来非常像它们实际上是您正在显示的图标的一部分。如果这是真的,那么 CSS/Javascript/Whatever 将无济于事。您需要修改实际图像。
-
@ChrisLively 我认为他的意思是问号周围的边界
标签: css image google-chrome stylesheet border