使用 HTML 中的 height 屬性來(lái)設(shè)置元素的高度。您可以將該屬性與以下元素一起使用 – 、、、、
示例
您可以嘗試運(yùn)行以下代碼來(lái)在 HTML 中實(shí)現(xiàn) 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>
登錄后復(fù)制
以上就是如何在HTML中添加元素的高度?的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注www.92cms.cn其它相關(guān)文章!






