问题描述
我正在尝试在视频中心隐藏默认的播放按钮.我有一个自定义播放按钮,但本地播放按钮显示在平板电脑和移动设备的下方.我无法使用::--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;
}
有什么想法吗?
推荐答案
进行了一些搜索,但在在此处发表评论,并确认它可以在Android版Chrome浏览器上正常工作.
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中隐藏视频的本地播放按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!