在Google Chrome中隐藏视频的本地播放按钮 [英] Hide native play button for video in google chrome

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

问题描述

我正在尝试在视频中心隐藏默认的播放按钮.我有一个自定义播放按钮,但本地播放按钮显示在平板电脑和移动设备的下方.我无法使用::--webkit-media-controls-play-button::-webkit-media-controls-start-playback-button访问它的CSS.

I'm trying to hide the default play button in the center of my video. I have a custom play button but the native play button is displaying underneath it on tablet and mobile. I can't access the CSS for it with either::--webkit-media-controls-play-button or ::-webkit-media-controls-start-playback-button.

我遇到与 https://stackoverflow相同的问题.com/questions/39602852/disable-download-button-for-google-chrome# = 但我坚持寻找类似的解决方案.

I'm having the same issue as https://stackoverflow.com/questions/39602852/disable-download-button-for-google-chrome#= but I'm stuck on finding a similar solution.

可以使用下面的CSS完全隐藏控件,但是在这种情况下,我只想隐藏播放按钮.

Hiding the controls completely with the CSS below will work but I only want to hide the play button in this case.

video::-webkit-media-controls{
    display: none;
    -webkit-appearance: none;
}

有什么想法吗?

推荐答案

进行了一些搜索,但在

Took a bit of searching, but found it in the comments here and confirmed it works on Chrome for Android.

video::-webkit-media-controls-overlay-play-button {
  display: none;
}

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

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