如何在HTML中添加元素的高度?

原创
ithorizon 5个月前 (10-19) 阅读数 54 #HTML

使用 HTML 中的 height 属性来设置元素的高度。您可以将该属性与以下元素一起使用 - 、、

示例

您可以尝试运行以下代码来在 HTML 中实现 height 属性 -

<!DOCTYPE HTML>
<html>
   <body>
      <video width = "300" height = "200" controls autoplay>
         <source src = "/html5/foo.ogg" type = "video/ogg" />
         <source src = "/html5/foo.mp4" type = "video/mp4" />
         Your browser does not support the video element.
      </video>
   </body>
</html>

以上就是如何在HTML中添加元素的高度?的详细内容,更多请关注IT视界其它相关文章!



热门