包含嵌入內容(16:9 寬高比)的 Bootstrap 容器


在 Bootstrap 中使用 .embed-responsive 類為嵌入內容設定容器。

對於嵌入內容的 16:9 寬高比,使用 embed-responsive-16by9

示例

現場演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <h2>Eclipse Refactoring</h2>
         <p>To refactor code in Eclipse, try the below given steps in the video:</p>
         <div class = "embed-responsive embed-responsive-16by9">
            <iframe class = "embed-responsive-item" src = "https://www.youtube.com/embed/YFVV6RAUnNg "></iframe>
         </div>
      </div>
   </body>
</html>

更新於:12-Jun-2020

287 次瀏覽

開啟你的事業

完成課程並獲得認證

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