html---6.使用图像image

6.1添加图像

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <img src="123.jfif"/>
</body>
</html>

6.2设置图像属性

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
6.3.1图像高度--height
<!--设置图像高度为160-->
<img src="123.jfif" height="160"/>

6.3.2图像宽度---width
<img src="123.jfif" width="160" height="160"/>

6.3.3图像边框---border
<img src="123.jfif" width="600" height="400" border="3"/><br>

6.3.4设置水平间距<br>
<img src="123.jfif" width="160" height="160" hspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" hspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" hspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" hspace="20" border="2"/><br>

6.3.5设置垂直间距--vspace<br>
<img src="123.jfif" width="160" height="160" vspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" vspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" vspace="20" border="2"/>
<img src="123.jfif" width="160" height="160" vspace="20" border="2"/><br>

6.3.6设置相对于文字基准线的对齐方式---align<br>
<font size="+3" color="aqua">玫瑰的生长过程</font>
<img src="123.jfif" width="160" height="160" align="bottom"/>
<img src="123.jfif" width="160" height="160" align="middle"/>
<img src="123.jfif" width="160" height="160" align="baseling"/>
<img src="123.jfif" width="160" height="160" align="texttop"/>
<img src="123.jfif" width="160" height="160" align="absmiddle"/>

6.3.7图像的提示文字---alt
<img src="123.jfif" alt="海绵宝宝与派大星"/>

</body>
</html>

6.3图像的超链接

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
6.4.1设置图像的超链接
<a href="https://www.iqiyi.com/v_12r43hmj4zw.html?vfm=2008_aldbd&fv=p_02_01" target="_blank"> <img src="123.jfif"></a>

6.4.2设置图像的热区链接
<img src="123.jfif" usemap="#map"/>
<map name="map" id="map" >
    <!--<area shape="circle" coords="100,205,11" href="6.4图像的超链接.html"/>-->
    <area shape="rect" coords="10,10,200,200" href="6.1图像的基本格式.html"/>
    <!--<area shape="circle" coords="352,93,15" href="6.2添加图像.html"/>-->
</map>
</body>
</html>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值