[英]Make a img clickable behind a text
我有一个图像(一个圆形图像),该图像具有一个指向特定URL的圆形区域,并且在该图像上我有一些文本(一个简单的“ <p>”标记),但是现在的问题是单击该图像而不是单击文本以转到URL,当您单击文本时,您只是在选择文本,仅此而已。
我该如何解决?
<p>this is the text<br />
that is not clickable, only selectable :( </p>
<img src="circle.png" alt="" usemap="#hitzone" />
<map name="hitzone">
<area shape="circle" coords="0,0,100" href="#">
</map>
你可以试试:
<p>
<a href="your url here" style="text-decoration: none; color: black">Click me</a>
</p>
<img src="circle.png" alt="" usemap="#hitzone" />
<map name="hitzone">
<area shape="circle" coords="0,0,100" href="#">
</map>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.