CSS youtube 자동 높이

<html>
<head>
<style>
	.video-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden;}	
	.video-container iframe,.video-container object,.video-container embed{position:absolute;top:0;left:0;width:100%;height:100%;} 
</style>
</head>

<body>
	<h1>테스트 페이지</h1>
	<div class="video-container"> 
    <iframe width="100%" src="https://www.youtube.com/embed/HkMNOlYcpHg" frameborder="0" allowfullscreen></iframe>
	</div> 
</body>
</html>
CSS에 게시되었습니다

관련 글

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다