Html 更改 HTML5 音频标签中的控件颜色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24367263/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 02:07:22  来源:igfitidea点击:

Change the control colors in the HTML5 audio tag

csshtmlfirefoxhtml5-audio

提问by alloyoussef

Is it possible to change the 'play', 'pause', and 'volume' colors in the HTML5 audio tag.

是否可以更改 HTML5 音频标签中的“播放”、“暂停”和“音量”颜色。

They have a very dark color when using Firefox and they make the player look disabled.

使用 Firefox 时,它们的颜色非常深,使播放器看起来被禁用。

采纳答案by Jordan L. Osier

Answer: No. Currently, you cannot change the color of the controls of the HTML5 audio tag. If you enable the controls attribute, the appearance of the 'play', 'pause', and 'volume' will be dependent on the browser.

答:不可以。目前,您无法更改 HTML5 音频标签控件的颜色。如果启用控件属性,“播放”、“暂停”和“音量”的外观将取决于浏览器。

With more work though, you can use JavaScript to create your own audio player interface that connects to the audio element's API.

不过,通过更多的工作,您可以使用 JavaScript 创建自己的音频播放器界面,该界面连接到音频元素的 API。

Your question is a more focused version of what was asked here:

您的问题是这里提出的问题的更集中版本:

Is it possible to style html5 audio tag?

是否可以设置 html5 音频标签的样式?

And here are some articles on how to create a unique audio player:

这里有一些关于如何创建独特的音频播放器的文章:

http://serversideup.net/style-the-html-5-audio-element/

http://serversideup.net/style-the-html-5-audio-element/

http://webdesign.tutsplus.com/tutorials/create-a-customized-html5-audio-player--webdesign-7081

http://webdesign.tutsplus.com/tutorials/create-a-customized-html5-audio-player--webdesign-7081