Materialize Media

Materialize Media– Materialize provides classes for displaying media content. Here in this tutorial we are going to explain how you can use media classes in MaterializeCSS to manage the media content. You can also use our online editor to edit and run the code online. You can also watch video tutorial for media content tutorial.

Materialize Media Example


Images can be styled in following ways-

Responsive Images

To create responsive images you need to add the class responsive-img to the image tag which will make image responsive-

Materialize Media | Responsive Images Example:

<img class="responsive-img" src="myimage.jpg">

Try it »

Circular Images

To make image circular just add circle class to the image tag.

Materialize Media | Image Circle Example:

<img class="circle responsive-img" src="myimage.jpg">                                                                                                                                                                                                                                                                                                         

Try it »

If you run the above example it will produce output something like this –

Materialize Media | Image Circle Example:


You can embed the videos in page using responsive-video and video-container class.

Responsive Embed

If you want to embed videos such as youtube videos you can embed videos simply as below which will be responsive on all devices.

Materialize Media | Embed Youtube Video Example:

<div class="video-container">
        <iframe width="853" height="480" src="" frameborder="0" allowfullscreen></iframe>

Try it »

Responsive Videos

You can make html videos responsive by simply adding the class responsive-video

Materialize Media | Responsive Video Html 5 Example:

 <video class="responsive-video" controls>
    <source src="my_movie.mp4" type="video/mp4">


Add Comment

📖 Read More