2023使用 CSS 设置图像的高度

 所属分类:web前端开发

 浏览:36次-  评论: 0次-  更新时间:2023-09-27
描述:更多教程资料进入php教程获得。 The height property is used to set the height of an image. This property can ha...
更多教程资料进入php教程获得。

使用 CSS 设置图像的高度

The height property is used to set the height of an image. This property can have a value in length or in %. While giving value in %, it applies it in respect of the box in which an image is available.

Example

You can try to run the following code to set the height of an image −

<html>
   <head>
   </head>
   <body>
      <img style = "border:2px solid green; height:100px;" src="/css/images/logo.png" />
      <br />
      <img style="border:2px solid green; height:50%;" src="/css/images/logo.png" />
   </body>
</html>
 标签:
积分说明:注册即送10金币,每日签到可获得更多金币,成为VIP会员可免金币下载! 充值积分充值会员更多说明»

讨论这个素材(0)回答他人问题或分享使用心得奖励金币

〒_〒 居然一个评论都没有……

表情  文明上网,理性发言!