I have a video element set to 100% width in a container div. That div has a max-width of 800px and min-width of 400px. When resizing the browser I need the video element to resize while retaining its original aspect ratio. Currently it resizes in width but remains its original height, adding letterbox bars above and below to make up for it.
Is it possible to resize the video element dynamically like this without resorting to Javascript? What did you set the height to? is it a static measurement?
以上就是HTML5 Video: Retain aspect ratio when resizing的详细内容,更多请关注web前端其它相关文章!