文章内容
1、HTML页面
1 2 3 4 5 6 | /* 小程序 */< view class = "video" > < video src = "" ></ video > </ view > /* H5 */< div class = "video" > < video src = "" ></ video > </ div > |
2、CSS样式
01 02 03 04 05 06 07 08 09 10 11 12 | video { width : 100% ; position : absolute ; height : 100% ; } .video { position : relative ; width : 100% ; height : 0 ; padding-bottom : 56% ; background-color : #333 ; } |