<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Video Responsive</title>
<style>
*{
margin: 0px;
padding: 0px;
}
body{
font-size: 14px;
}
main{
text-align: justify;
max-width: 960px;
width: 96%;
margin: 0px auto;
}
h1{
font-size: 5vw;
}
header{
padding: 50px 0px 30px;
text-align: center;
}
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
iframe {
border: none;
}
footer{
text-align: center;
margin-top: 100px
}
@media (orientation: portrait) {
h1{
font-size: 8vw;
}
}
</style>
</head>
<body>
<header>
<h1>This Is a Responsive Title For Example</h1>
</header>
<main>
<div class="videoWrapper">
<iframe width="560" height="349" src="https://www.youtube.com/embed/djV11Xbc914"></iframe>
</div>
</main>
<footer>
<em>© http://mysite.com/</em>
</footer>
</body>
</html>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.