widescreen

优质
小牛编辑
136浏览
2023-12-01

描述 (Description)

默认情况下,宽高比为4:3; 使用widescreen类,您可以将嵌入视频的比例设置为16:9。

例子 (Example)

以下示例演示如何使用widescreen类在Foundation中嵌入视频。

<html>
   <head>
      <title>Flex Video Widescreen</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
   </head>
   <body>
      <div class = "flex-video widescreen">
         <iframe width = "420" height = "315" src = "/foundation/images/kitchen_sink/video.mp4" frameborder = "0" allowfullscreen></iframe>
      </div>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
      <script>
         $(document).ready(function() {
            $(document).foundation();
         })
      </script>
   </body>
</html>