Safari on iPad (iOS6) does not scale HTML5 video to fill 100% of page width

后端 未结 5 1659
你的背包
你的背包 2020-12-07 13:08

I am using the following CSS to display a video in full width (100%) on a responsive HTML5 page. The native size of the video is 480x270. The video is scaled to fill the ful

5条回答
  •  眼角桃花
    2020-12-07 13:32

    I had a similar scenario with IOS6 and a video object not resizing to its parent. I resolved it by targeting all elements within the parent div containing the video with CSS. So in your example you would have to surround your video with a div (eg class="DivWithVideo") and add the following CSS:

     .DivWithVideo * {max-width: 100%}
    

提交回复
热议问题