Last active
March 21, 2019 02:35
-
-
Save cbessadejusticia/6cbda46b70fc43581387926cbecc6593 to your computer and use it in GitHub Desktop.
iframe with screen border/background based on technique by Evan on Stackoverflow: https://stackoverflow.com/a/25573922/3594287
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="tv-outer-container"> | |
| <div class="tv-inner-container"> | |
| <iframe width="640" height="360" src="//www.youtube.com/embed/f890SC1schE" frameborder="0" allowfullscreen></iframe> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .tv-outer-container { | |
| width: 100%; | |
| height: 100%; | |
| max-width: 1034px; | |
| max-height: 543px; | |
| margin: 0 auto; | |
| } | |
| .tv-inner-container { | |
| position: relative; | |
| padding-top: 25px; | |
| padding-bottom: 87.5%; | |
| height: 0; | |
| } | |
| .tv-inner-container iframe { | |
| box-sizing: border-box; | |
| background: url(https://i.imgur.com/MdhjPiY.png) center center no-repeat; | |
| background-size: contain; | |
| padding: 3% 5.5% 33%; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div> | |
| <div> | |
| <iframe width="560" height="315" src="//www.youtube.com/embed/f890SC1schE" frameborder="0" allowfullscreen></iframe> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div { | |
| width: 100%; | |
| height: 100%; | |
| max-width: 1034px; | |
| max-height: 543px; | |
| margin: 0 auto; | |
| } | |
| div div { | |
| position: relative; | |
| padding-top: 25px; | |
| padding-bottom: 67.5%; | |
| height: 0; | |
| } | |
| div iframe { | |
| box-sizing: border-box; | |
| background: url(http://i.stack.imgur.com/zZNgk.png) center center no-repeat; | |
| background-size: contain; | |
| padding: 11.9% 15.5% 14.8%; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment