我们的设计师为链接创建了这个 CSS
A
{
text-decoration: underline;
color: #E77C15;
}
A:link
{
text-decoration: underline;
color: #E77C15;
}
A:visited
{
text-decoration: underline;
color: #E77C15;
}
A:hover
{
text-decoration: underline;
color: #039;
}
A:active
{
text-decoration: underline;
color: #E77C15;
}
我需要一个没有边框的图片链接。现在它的边框颜色来自它周围的 css。
我试过了
<a href='myurl' style="border-style:none; text-decoration:none" >
<img src="myimage.png" style="width: 20px; height: 20px" alt="Remove" title="Remove" />
</a>
但边框仍然显示。 如何删除此链接图像周围的边框。 谢谢!
最佳答案
您应该将 CSS 添加到 <img>
,而不是<a>
.
最好使用通用的 CSS 规则:
img { border:none }
关于css - 从链接图像中删除 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6203477/