CodeHQ

Posts Tagged ‘HTML5’

|

Full-screen and centralised responsive video | CSS

Thursday, October 29th, 2015

.video {
	position: absolute;
	top: 50%; 
	left: 50%;
	z-index: 1;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
}

EDIT: Another method I found and am trying is this CSS based responsive video that keeps the 16/9 ratio.

Tags: , , , ,
Posted in CSS | No Comments »