Skip to content

Instantly share code, notes, and snippets.

@ellor1138
Created January 20, 2020 13:38
Show Gist options
  • Save ellor1138/db95e39521a327c0430a4bb2542b9225 to your computer and use it in GitHub Desktop.
Save ellor1138/db95e39521a327c0430a4bb2542b9225 to your computer and use it in GitHub Desktop.
Embeded responsive video with Bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<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/tgbNymZ7vqY"></iframe>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment