【问题标题】:How do I remove the blue border on an image in an image map?如何删除图像映射中图像上的蓝色边框?
【发布时间】:2020-04-08 21:51:11
【问题描述】:

我为时事通讯中的图像创建了图像映射。每次单击链接区域时,它周围都会出现一个蓝色边框(下图)。有没有办法阻止这种情况?我是编码新手,所以任何帮助将不胜感激。谢谢!

这是我的代码:

<img src="1234.jpg" width="600" height="341" border="0" usemap="#map">

<map name="map">
<area shape="rect" coords="18,24,193,64" href="https://google.com/">
<area shape="rect" coords="212,23,388,287" href="https://google.com/">
<area shape="rect" coords="405,23,582,287" href="https://google.com/">
</map>

Blue border

【问题讨论】:

    标签: html css


    【解决方案1】:

    您可以在 CSS 中设置。

    img {
      outline: 0;
    }
    

    或者作为样式属性:

    <img src="1234.jpg" width="600" height="341" border="0" usemap="#map" style="outline: 0;">
    

    【讨论】:

    • 非常感谢您的回复!不幸的是,这似乎不起作用。我不确定这是否与我正在使用的平台(MailChimp)有关,但我不认为就是这样。将继续研究。
    • 你能把边距和内边距归零吗? style="margin: 0; 边框: 0; padding: 0;
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-17
    • 2015-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多