首頁  >  文章  >  web前端  >  html video標籤怎麼用

html video標籤怎麼用

青灯夜游
青灯夜游原創
2019-05-27 15:52:144946瀏覽

video標籤是 HTML 5 的新標籤,用於定義視頻,例如電影片段或其他視訊串流。目前,video 元素支援三種影片格式:MP4、WebM、Ogg。可以在video的開始標籤和結束標籤之間放置文字內容,這樣舊的瀏覽器就可以顯示不支援該標籤的資訊。

html video標籤怎麼用

html video標籤怎麼用?

作用:定義視頻,例如電影片段或其他視訊串流。

說明:可以在 標籤之間放置文字內容,這樣不支援

註解:

html video標籤 範例

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</head>
<body>
<video width="320" height="240" controls>
  <source src="https://img.php.cn/ueditor/php/upload/video/20190327/1553657855333112.mp4"  type="video/mp4">
  <source src="https://img.php.cn/ueditor/php/upload/video/20190327/1553657855333112.ogg"  type="video/ogg">
  您的浏览器不支持 HTML5 video 标签。
</video>
</body>
</html>

效果圖:

html video標籤怎麼用

以上是html video標籤怎麼用的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn