Html 如何在IE中关闭图像边框

Html 如何在IE中关闭图像边框,html,css,internet-explorer,Html,Css,Internet Explorer,我试图删除ie中的图像边框,但出现了一些奇怪的行为 这是我的密码: img{border:none} 但它仍然不工作,IE调试器向我显示图像border:medium。我的div比每幅图像大10像素。试试看 img { border-width: 0; } 没有值“none”,请改用边框:0从图像链接中删除边框: a img { border:0px; } 在IE上运行良好此修复程序包含在Eric Meyer的重置CSS中,您可能会感兴趣: /* Eric Meyer's

我试图删除ie中的图像边框,但出现了一些奇怪的行为

这是我的密码:

img{border:none}

但它仍然不工作,IE调试器向我显示图像
border:medium
。我的div比每幅图像大10像素。

试试看

img {
  border-width: 0;
}

没有值“none”,请改用边框:0从图像链接中删除边框:

a img
{
     border:0px;
}

在IE上运行良好

此修复程序包含在Eric Meyer的重置CSS中,您可能会感兴趣:

/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}

@dplass的副本:这怎么可能是这个问题之后提出的问题的副本?如果有什么不同的话,那应该是这个的翻版。我相信你的解决方案要好得多,而且恰恰指向了错误。谢谢你