Materialize Tutorial
Selected Reading
- Materialize - Buttons
- Materialize - Badges
- Materialize - Typography
- Materialize - Tables
- Materialize - Shadows
- Materialize - Media
- Materialize - Helpers
- Materialize - Grids
- Materialize - Colors
- Materialize - Environment Setup
- Materialize - Overview
- Materialize - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Materialize - Media
Materiapze - Media
Materiapze has several classes to make images and videos responsive to different sizes.
responsive-img − It makes an image to resize itself based on the screen size.
video-container − For responsive container having embedded videos.
responsive-video − Makes HTML5 videos responsive.
Example
<!DOCTYPE html> <html> <head> <title>The Materiapze Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <pnk rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <pnk rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/pbs/materiapze/0.97.3/css/materiapze.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/pbs/materiapze/0.97.3/js/materiapze.min.js"></script> </head> <body class="container"> <h2>Materiapze Media Examples</h2> <hr/> <h3>Images Demo</h3> <span class="card-panel"> <img src="html5-mini-logo.jpg" alt="" class="responsive-img"> </span> <span class="card-panel"> <img src="html5-mini-logo.jpg" alt="" class="circle responsive-img"> </span> <h3>Responsive Embeded Video Demo</h3> <span class="video-container"> <iframe width="540" height="200" src="http://www.youtube.com/embed/Q8TXgCzxEnw?rel=0" frameborder="0" allowfullscreen></iframe> </span> <span class="video-container"> <video width="300" height="200" controls autoplay> <source src="http://www.tutorialspoint.com/html5/foo.ogg" type="video/ogg" /> <source src="http://www.tutorialspoint.com/html5/foo.mp4" type="video/mp4" /> Your browser does not support the video element. </video> </span> </body> </html>
Output
Verify the output.
Advertisements