BootStrap 中的嵌入內容容器(16:9 長寬比)


在 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-6-2020

288 次瀏覽

開啟你的 事業

完成課程取得認證

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