Materialize-媒体



 

Materialize具有多个类别,可根据不同的尺寸制作图像和视频。

  • 响应img-它使图像根据屏幕大小调整自身大小。
  • video-container-用于具有嵌入式视频的响应式容器。
  • 响应视频-使HTML5视频具有响应能力。

materialize_media.htm

<title>The Materialize Example</title>
      <meta name="viewport" content="width = device-width, initial-scale = 1">      
      <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>           
      <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js">
      </script>             
   
   
    
      <h2>Materialize Media Examples</h2>
      
      <hr>
      <h3>Images Demo</h3>
      <div class="card-panel">
         <img src="https://mangdo-1254073825.cos.ap-chengdu.myqcloud.com//front_eng_imgs/programiz/ac300eef973ff806bb77c79786b6b62faf0ee3f1c58d39752c087e3b_2.jpg" alt="" class="responsive-img">        
      </div>
      
      <div class="card-panel">
         <img src="https://mangdo-1254073825.cos.ap-chengdu.myqcloud.com//front_eng_imgs/programiz/ac300eef973ff806bb77c79786b6b62faf0ee3f1c58d39752c087e3b_3.jpg" alt="" class="circle responsive-img">         
      </div>

      <h3>Responsive Embeded Video Demo</h3>
      <div class="video-container">
         <iframe width="540" height="200" src="https://www.youtube.com/embed/Q8TXgCzxEnw?rel=0" frameborder="0" allowfullscreen=""></iframe>
      </div>
      
      <div class="video-container">
         <video width="300" height="200" controls="" autoplay="">
            <source src="http://www.tutorialspoint.com/html5/foo.ogg" type="video/ogg"></source>
            <source src="http://www.tutorialspoint.com/html5/foo.mp4" type="video/mp4"></source>
            Your browser does not support the video element.
         </video>
      </div>
   

结果

验证结果。

Made with ❤️ in Chengdu. Copyright reserved 2019-2022.

蜀ICP备20006366号-1