Home  >  Q&A  >  body text

javascript - The level of h5 video is too high and it floats above the div. How to solve it?

When using the video tag to create video elements in

h5, the level of some Android videos will become the highest, which cannot be solved using z-index. What should I do?

typechotypecho2673 days ago2061

reply all(3)I'll reply

  • 習慣沉默

    習慣沉默2017-06-24 09:45:21

    <video playsinline -webkit-playsinline ></video>

    If that doesn’t work:

    video{
        display : none;
    }
    
    setInterval(function(){
        canvas.getContext('2d').drawImage(video,0,0);
    },16);

    reply
    0
  • 某草草

    某草草2017-06-24 09:45:21

    Try it in an absolutely positioned container.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-24 09:45:21

    Some Android webviews will actively start the system's built-in player when they detect that the video tag is playing, and the browser will be covered by the pop-up player.

    reply
    0
  • Cancelreply