CSS:仅 IE 和 Firefox 中的蓝色边框?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3003691/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 22:11:57  来源:igfitidea点击:

CSS: blue border in IE and Firefox only?

css

提问by aneuryzm

I don't understand why I have this blue border around the links images in my page.

我不明白为什么我的页面中的链接图像周围有这个蓝色边框。

I've set outline:none border:0 but still it is there (only in Firefox and IE)... it is very strange.

我已经设置了 outline:none border:0 但它仍然存在(仅在 Firefox 和 IE 中)......这很奇怪。

http://www.alimdardesign.com/fabulicious/features.html

http://www.alimdardesign.com/fabulicious/features.html

Thanks

谢谢

回答by Sarfraz

Because you have an image inside a link, this border comes up, try this css:

因为你在链接中有一个图像,这个边框出现了,试试这个 css:

a img
{
  border:none;
}

回答by bcosynot

every linked image has a blue border around it. do fix this web designers generally use the following css

每个链接的图像周围都有一个蓝色边框。做修复这个网页设计师通常使用以下css

a img
{
  border : 0;
}

also try :

也尝试:

img
{
  border: 0;
}

回答by VMAtm

This is standart behaviour of images inside the a-tags

这是 a 标签内图像的标准行为

<img border="0" />

or

或者

a img {
  border:none;
}

回答by Delan Azabani

The border style should apply to the image, not the link.

边框样式应应用于图像,而不是链接。

回答by steve

a img
{
  border : 0;
}

This worked for me. I inserted this exactly into my style.css file and I no longer see the border around the image in IE (no issue with Chrome).

这对我有用。我将它完全插入到我的 style.css 文件中,并且在 IE 中看不到图像周围的边框(Chrome 没有问题)。

Steve

史蒂夫