欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

如何在2021年8月13日使用HTML5实现图片的局部热点区域跳转?

最编程 2024-02-12 21:55:24
...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <!-- 让页面显示一张图片,引用myMap划分多个热区 --> <img src='./img/universe.jfif' usemap="#myMap" height="500"> <map name='myMap'> <!-- 热区为圆型,圆心位置-190*150,半径139;该热区跳转至www.baidu.com;在新标签打开链接 --> <area shape="circle" coords="190,150,130" href="http://www.baidu.com" target="_blank"> <!-- 热区为矩形,左上坐标-600*400,右下角坐标-700*500;该热区跳转至www.weibo.com;在新标签打开链接 --> <area shape="rect" coords="500,350,600,450" href="http://www.weibo.com" target="_blank"> </map> </body> </html>