HTML5 Video element on IPhone has border

前端 未结 3 2163
遇见更好的自我
遇见更好的自我 2021-02-15 14:09

I have been building an app recently and have a loading animation playing at the start (just a mp4 video - for aesthetic purposes). It works great everywhere apart from on Iphon

3条回答
  •  误落风尘
    2021-02-15 14:22

    I’ve been struggling for a few hours and found this as the only way to remove it (tested on Safari, Chrome and Firefox on iOS):

    video {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
        -webkit-backface-visibility: hidden;
        -moz-backface-visibility: hidden;
    }
    

    Took inspiration from this gist

提交回复
热议问题