图像周围的紫线:
我有以下html代码:
<a id="a1" href="test.aspx" target="_blank">
<img id="Img2" src="Images/Icon.gif" runat="server" style="width: 70px; text-align: center;" />
</a>
我得到的图像周围有紫色边框。就像访问的超链接的颜色一样。
我尝试添加样式:文本装饰:无。
尝试过-白色边框,尝试将样式设置为全无:链接,已访问
但是仍然保留紫色边框。有什么帮助吗?我不要在图像周围出现任何边界。
最佳答案
它可能不是图像的边界,而是链接的边界。
您可以执行以下操作:
<a id="a1" style="border:0;" href="test.aspx" target="_blank">
<img id="Img2" src="Images/Icon.gif" runat="server" style="width: 70px; text-align: center;border:0;" />
</a>