如何在 HTML 中包含音訊/影片控制元件?


在 HTML 中使用 controls 屬性來包含音訊/影片控制元件。

示例

你可以嘗試執行以下程式碼來實現 controls 屬性--

<!DOCTYPE html>
<html>
   <head>
      <title>HTML video Tag</title>
   </head>
   <body>
      <p>Online Compiler</p>
      <br />
      <video width = "500" height = "300" controls>
         <source src = "/html/compileonline.mp4" type = "video/mp4">
         This browser doesn't support video tag.
      </video>
   </body>
</html>

更新日期:03-03-2020

416 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

開始學習
廣告
© . All rights reserved.