隐藏iPhone HTML5视频播放按钮 [英] Hide iPhone HTML5 video play button

查看:2133
本文介绍了隐藏iPhone HTML5视频播放按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏默认显示在< video> 元素

I want to hide the big play button that appears by default on the <video> element

上的大播放按钮有可能吗?

Is it possible?

推荐答案

苹果似乎又改变了影子dom。

It seems Apple has changed the shadow-dom again.

为了隐藏播放按钮控件,你必须使用以下CSS:

In order to hide the play button control you must use the following CSS:

/* This used to work for the parent element of button divs */
/* But it does not work with newer browsers, the below doesn't hide the play button parent div */

*::-webkit-media-controls-panel {
  display: none!important;
  -webkit-appearance: none;
}

/* Old shadow dom for play button */

*::-webkit-media-controls-play-button {
  display: none!important;
  -webkit-appearance: none;
}

/* New shadow dom for play button */

/* This one works! */

*::-webkit-media-controls-start-playback-button {
  display: none!important;
  -webkit-appearance: none;
}

这篇关于隐藏iPhone HTML5视频播放按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆