유투브나 기타 영상을 올릴때 아이프레임 형식이라서
스마트폰(가로/세로 바꾸면서)에 보여주기 할때 영상 가로세로 비율이 자동으로
변하지 않습니다. 그래서 여기저기 찾다가 발견해서 올려 봅니다.
출처 : 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24149 | |
| 24140 | |
| 24133 | |
| 24125 | |
| 24119 | |
| 24109 | |
| 24105 | |
| 24101 | |
| 24093 | |
| 24089 | |
| 24077 | |
| 24074 | |
| 24071 | |
| 24070 | |
| 24067 | |
| 24056 | |
| 24050 | |
| 24046 | |
| 24043 | |
| 24040 | |
| 24037 | |
| 24036 | |
| 24035 | |
| 24034 | |
| 24021 | |
| 24017 | |
| 24005 | |
| 24002 | |
| 23990 | |
| 23980 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기