Image in

后端 未结 1 805
灰色年华
灰色年华 2021-01-19 16:39

For some reason I\'m unable to set the image size when using an tag inside an html5 video element. It is always defau

1条回答
  •  不知归路
    2021-01-19 17:37

    I believe this is the browser's way of hiding the since the element is supported in Chrome. If you open this in IE8 for example, the fallback content is displayed correctly.

    The conditions you have used to test the fallback are incorrect. Removing the video source will simply result in the browser not finding the content (i.e. a 404). In this case, the correct fallback is to use the poster="" attribute on the

    poster

    The address of an image file for the UA to show while no video data is available

    For example:

    
    

    Full Demo (working for me in Chrome 26)

    
    
    
      
      HTML5 video demo
    
    
      
    
    
    

    0 讨论(0)
提交回复
热议问题