您的位置:首页 > 其它

针对video标签改变其缩放比例比如4:3

2015-11-16 15:15 435 查看
<div class='border'>
<video src='xxxxxx.mp4'></video>
<div>
<style>
.border{
position:relative;
width:100%;
height:0;
padding-bottom:75%; //因为padding和margin等受width影响,父容器固定后,子标签可以进行填充。此处75%是3/4,其他比例可以依照此法。
}
video{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
}
</style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: