Html 如何在 IE 中关闭图像边框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2958688/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How switch off image border in IE
提问by Kein
I'm trying to remove the image border in ie, but I get some strange behavior.
我正在尝试删除 ie 中的图像边框,但出现了一些奇怪的行为。
Here's my code:
这是我的代码:
img {border: none}
<img src="..." border="0" style="border: 0"/>
But it's still not working, and IE debugger shows me image border: medium
. And my div is larger by 10px per image.
但它仍然无法正常工作,并且 IE 调试器向我显示了 image border: medium
。我的 div 每张图片大 10px。
回答by Robusto
Try
尝试
img {
border-width: 0;
}
回答by Faisal
Remove border from image link:
从图像链接中删除边框:
a img
{
border:0px;
}
Works fine on IE
在 IE 上运行良好
回答by zuups
there is no value 'none', use border: 0 instead
没有值 'none',请改用 border: 0
回答by cprcrack
This fix is included in Eric Meyer's Reset CSS, you might be interested:
此修复程序包含在 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}