图片的映射--map标签

自从上一下公司离职后,就没有继续更新博客了,最近在做前端的相关兼职。
今天客户要求使用一张大图,然后在其中应用多个超链接,对于之前没用过map标签的我是懵逼的。
但通过学习,发现map挺方便的,于是继续更新博客记录我的新手前端生涯。
话不多说,直接上代码:

<img src='img/as.png'  class="img-responsive" usemap="#planetmap2"/>
<map name="planetmap2" id="planetmap2">
	 <area shape="circle" coords="45,47,40" href="#" alt="..." />
	 <area shape="circle" coords="45,133,40" href="#" alt="..." />
	 
	 <area shape="circle" coords="130,47,40" href="#" alt="..." />
	 <area shape="circle" coords="130,133,40" href="#" alt="..." />
	 
	 <area shape="circle" coords="220,47,40" href="#" alt="..." />
	 <area shape="circle" coords="220,133,40" href="#" alt="..." />
	 
	 <area shape="circle" coords="300,47,40" href="#" alt="..." />
	 <area shape="circle" coords="300,133,40" href="#" alt="..." />
</map>

效果:
在这里插入图片描述
点击不同的位置,链接到不同的地方。
对于img要使用 usemap="#planetmap2"和map标签连在一起,其中coords是定位,x(水平距离),y(垂直距离),z(半径)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值