Monday, May 14, 2018

How to add videos or slideshows scale properly on any device?



How to  add videos or slideshows scale properly on any device.

Responsive Embeds

Classes can be applied directly to <iframe>, <embed>, <video>, and <object> elements.

The following example creates a responsive video by adding an .embed-responsive-item class to an <iframe> tag (the video will then scale nicely to the parent element). The containing <div> defines the aspect ratio of the video:

Example

<div class="embed-responsive embed-responsive-16by9">  <iframe class="embed-responsive-item" src="..."></iframe></div>

No comments:

Post a Comment