How do you force HTML5 iframe
YouTube video to center fit, cover the full-screen window background using CSS3 HTML eventually Java?
As for example "paypal.it" home page background or "unity3d.com/5" top video, has as iframe youtube video.
The iframe
cover full screen (zooming) and cover all the width and height when re-size the window.
It re-size maintaining the 100% min width zooming the height or the 100% min height zooming the width.
How is this effect achieve using iframe
HTML5 and CSS3?
Code Example HTML5
<div class="video" style="opacity: 1;">
<iframe src="http://www.youtube.com/embed/AddHereVideoId?autoplay=1&html5=1" frameborder="0" style="height: 720px;">
</iframe>
</div>
Code CSS3 HTML eventually Java help would be appreciated.
I think this is what you're trying to achieve:
This will give you a video that fills the container that it is in and will automatically scale the height too.
I originally found this solution here: https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
For a real full screen solution, this can be achieved like this:
HTML
CSS
It is not perfect, e.g. it does not work well with extreme aspect ratios of the container, but is doing a great job in most situations. Here is a working example: https://codepen.io/anon/pen/zRVLGJ