-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathyoutube.css
37 lines (36 loc) · 963 Bytes
/
youtube.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Responsive design style sheet for pelican YouTube integration.
* Makes the video as wide as possible, keeping a specified aspect ratio
* of the video (e.g. 4:3, 16:9, etc. for width vs height). The video
* will resize and shrink as you resize the browser window. Enjoy!
*
* Integrate these definitions into your project style sheet, and use as
*
* <div class="youtube youtube-16x9">
* <iframe src="https://www.youtube.com/embed/VIDEO_ID" allowfullscreen seamless frameborder="0"></iframe>
* </div>
*
* (c) 2015 Peter Bittner <[email protected]>, license: MIT
*/
.youtube-4x3 {
padding-bottom: 75%; /* inverse of 4:3 aspect ratio */
}
.youtube-16x9 {
padding-bottom: 56.25%; /* inverse of 16:9 aspect ratio */
}
.youtube-4x3,
.youtube-16x9 {
position: relative;
height: 0;
overflow: hidden;
}
.youtube-4x3 iframe,
.youtube-16x9 iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
border: 0;
}