유투브나 기타 영상을 올릴때 아이프레임 형식이라서
스마트폰(가로/세로 바꾸면서)에 보여주기 할때 영상 가로세로 비율이 자동으로
변하지 않습니다. 그래서 여기저기 찾다가 발견해서 올려 봅니다.
출처 : http://kyouyoum.cafe24.com/archives/324
아래는 css에 넣어주시고요.
.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%;}
아래는 아이프레임 들어갈 곳에 넣습니다.
<div class="video-container">
<iframe width="100%" height="315" src="//www.youtube.com/embed/qKbAxJhoQgE" frameborder="0" allowfullscreen></iframe>
</div>
스마트폰(가로/세로 바꾸면서)에 보여주기 할때 영상 가로세로 비율이 자동으로
변하지 않습니다. 그래서 여기저기 찾다가 발견해서 올려 봅니다.
출처 : http://kyouyoum.cafe24.com/archives/324
아래는 css에 넣어주시고요.
.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%;}
아래는 아이프레임 들어갈 곳에 넣습니다.
<div class="video-container">
<iframe width="100%" height="315" src="//www.youtube.com/embed/qKbAxJhoQgE" frameborder="0" allowfullscreen></iframe>
</div>
댓글 10개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기