.embed-responsive-item - Used inside .embed-responsive. Scales the video nicely to the parent element - HTML CSS Bootstrap Class List

HTML CSS examples for Bootstrap Class List:embed-responsive-item

Description

.embed-responsive-item - Used inside .embed-responsive. Scales the video nicely to the parent element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head><!--from  ww  w . j a  v a2  s  .  c  o  m-->
<body>

<div class="container">
  <h2>Responsive Embed</h2>
  <p>Create a responsive video and scale it nicely to the parent element with an 16:9 aspect ratio</p>
  <div class="embed-responsive embed-responsive-16by9">
    <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/YE7VzlLtp-4"></iframe>
  </div>
</div>

</body>
</html>

Related Tutorials