iPad Safari mobile seems to ignore z-indexing position for html5 video elements

前端 未结 11 2017
鱼传尺愫
鱼传尺愫 2020-11-29 04:46

I got a video element on a page that\'s working fine both in safari mobile and desktop. I have a seme-transparent pull-down menu that\'s working fine. The problem is, when t

11条回答
  •  悲&欢浪女
    2020-11-29 04:55

    This is the code that will work on both the iPad and iPhone. I tried removing the controls and then add them again, but this worked only on iPad not on iPhone. After remove the opacity and then add it again it worked on iPhone also.

    $("#overlay_open").click(function(){
      $("video").prop("controls", false);
      $("video").css("opacity", 0);
    });
    
    $("#overlay_close").click(function(){
      $("video").prop("controls", true);
      $("video").css("opacity", 1);
    });
    

提交回复
热议问题