jessyhoule

Web / Full Screen Video Web

Jun 25th, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.75 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Scale YouTube iframe with CSS</title>
  4.  
  5. <style type="text/css">
  6. #Media {    position: relative; padding-bottom: 56.25%; /* 16:9 */  padding-top: 25px;  height: 0;}
  7. #Media iframe { position: absolute; top: 0; left: 0;    width: 100%;    height: 100%;}
  8.  
  9. #Article { max-width: 672px; margin-bottom: 20px; display: block; font-size: 16px; line-height: 23px;}
  10.  
  11. @media screen and (max-width: 727px) {
  12. #Article { max-width: 640px; min-width: 320px; margin-bottom: 20px; display: block; font-size: 16px; line-height: 23px;}
  13. }
  14. </style>
  15. </head>
  16. <body>
  17.  
  18. <div id="Article">
  19. <div id="Media">
  20. <iframe width="640" height="360" src="http://www.youtube.com/embed/ADTw-EmfjoE" frameborder="0" allowfullscreen></iframe>
  21. </div>
  22. </div>
  23.  
  24. </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment