flex-video

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

描述 (Description)

随着屏幕宽度的变化, .flex-video类可用于维护嵌入视频的宽高比。

例子 (Example)

以下示例演示如何在Foundation中嵌入视频。

<html>
   <head>
      <title>Flex Video</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
   </head>
   <body>
      <div class = "flex-video">
         <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>