Video tag to fill 100% div regardless of ratios

前端 未结 4 1674
無奈伤痛
無奈伤痛 2020-12-14 20:17

I am tying to have a video tag to fill 100% of a div:

a) it doesn\'t need to keep the ratios(otherwise we need to use the overflow:none);

b) fill a div, not

4条回答
  •  悲&欢浪女
    2020-12-14 20:35

    Use object-fit css property, though there is no support for IE, but it's still quite reasonable to be used for , tags.

    Check CanIUse for Browser Support, and CSS-Tricks for usage.

提交回复
热议问题