Zi 字媒體
2017-07-25T20:27:27+00:00
此篇文章瀏覽量:
785
1、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%;
}
html結構:
參考資料:Responsive Youtube Embed
若覺得文章有幫助,請多分享,讓其他同好也能吸收網站技能知識。
Facebook
Twitter
寫了
5860316篇文章,獲得
23313次喜歡