<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<img src="./img/2.jpg" alt="图片失效">
<img src="./img/1.jpg" alt="图片失效">
<!-- 和a元素联用 -->
<a href="https://www.baidu.com/" target="_blank" title="跳转到百度">
<img src="./img/solar.jpg" alt="图片失效">
</a>
<!-- 和map元素联用 -->
<!-- 类似锚连接 -->
<img usemap="#shanshui" src="./img/2.jpg" alt="">
<map name="shanshui">
<!-- shape 形状 coords 坐标 -->
<!-- area circle 圆形 x坐标 y坐标 圆的半径 -->
<area shape="circle" coords="360,204,48" href="https://www.baidu.com/" target="_blank">
<!-- rect 矩形 左上角x,y坐标 右下角x,y坐标 -->
<area shape="rect" coords="0,0,310,150" href="https://www.baidu.com/" target="_blank">
</map>
</body>
</html>
HTML-7图片元素
最新推荐文章于 2022-11-20 14:26:21 发布