코딩
반응형으로 동영상 삽입하는방법 본문
HTML
<div class="video">
<iframe width="640" height="360"
src="동영상 주소" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
</div>
CSS
.video {
position: relative;
padding-bottom: 56.25%; (wide화면 16:9=56.25 표준비율 4:3 =75)
height: 0;
overflow: hidden;
margin-bottom: 4em;
}
.video iframe,.video object,.video embed {
position: absolute;
top: 0;
left: 0;
width: 100%
height: 100%
}
'HTML+CSS' 카테고리의 다른 글
유명브랜드 컬러를 정리해놓은 “BrandColors” (0) | 2019.11.20 |
---|---|
그라데이션 코드와 CSS 코드 확인 가능 사이트 5 (0) | 2019.11.20 |
HTML+CSS 에서 id,class 차이점? (0) | 2019.11.01 |
2.한솔홈데코 홈페이지 따라 만들어보기[비주얼,제품영역] (0) | 2019.10.14 |
1.한솔홈데코 홈페이지 따라 만들어보기[헤더영역] (0) | 2019.10.14 |
Comments