相关疑难解决方法(0)

在Chrome/IE9中删除图像边框

我试图摆脱Chrome和IE9中每个图像显示的细边框.我有这个CSS:

outline: none;
border: none;
Run Code Online (Sandbox Code Playgroud)

使用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;
}
Run Code Online (Sandbox Code Playgroud)
<h1>Dashboard <img class="icon" border="0"></h1>
Run Code Online (Sandbox Code Playgroud)

参见附页截图:

截图

css google-chrome image border stylesheet

51
推荐指数
4
解决办法
7万
查看次数

标签 统计

border ×1

css ×1

google-chrome ×1

image ×1

stylesheet ×1