首页 > 解决方案 > 如何删除图像映射中图像上的蓝色边框?

问题描述

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

这是我的代码:

<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>

蓝色边框

标签: htmlcss

解决方案


您可以在 CSS 中进行设置。

img {
  outline: 0;
}

或作为样式属性:

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

推荐阅读