CSS,盒子周围的图像不会消失

时间:2013-07-24 22:22:17

标签: html css html5 css3

我有一个图像周围的框,准确的推特,我无法让它消失。它看起来如下所示:enter image description here它只发生在我的网站的互联网资源管理器中,www.isaveplus.com,在所有其他浏览器中,它没有出现。我以为是文字装饰,事实并非如此。以下是它的外观:

<div style="width:11%; float:left; background-color:#2C6B23; height: 51px; border-top-right-radius: 20px 20px; border-bottom-right-radius: 20px 20px; border-left-color:White; border-left-width:1px; border-left-style:groove; text-align:center ">
<a href="https://twitter.com/ISavePlus1" style="text-decoration:none;" target="_blank"> <img src="picture/twitter.png" alt="twitter" style="height: 100%; width:auto; text-decoration:none;" /> </a>
</div>

有关如何删除图像周围的蓝框的任何建议?谢谢!

3 个答案:

答案 0 :(得分:0)

为img

添加 border:0
<div style="width:11%; float:left; background-color:#2C6B23; height: 51px; border-top-right-radius: 20px 20px; border-bottom-right-radius: 20px 20px; border-left-color:White; border-left-width:1px; border-left-style:groove; text-align:center ">
<a href="https://twitter.com/ISavePlus1" style="text-decoration:none;" target="_blank"> <img src="picture/twitter.png" alt="twitter" style="height: 100%; width:auto; text-decoration:none; border:0" /> </a>
</div>

但最好将其导入外部css文件,而不是样式属性。

img{border:0;}/* reset border for all images*/

答案 1 :(得分:0)

为img添加 border:none

<div style="width:11%; float:left; background-color:#2C6B23; height: 51px; border-top-right-radius: 20px 20px; border-bottom-right-radius: 20px 20px; border-left-color:White; border-left-width:1px; border-left-style:groove; text-align:center ">
<a href="https://twitter.com/ISavePlus1" style="text-decoration:none;" target="_blank"> <img src="picture/twitter.png" alt="twitter" style="height: 100%; width:auto; text-decoration:none; border:none" /> </a>
</div>

答案 2 :(得分:0)

您应该使用style="border:0"