是否可以设置 html5 音频标签的样式? [英] Is it possible to style html5 audio tag?

查看:30
本文介绍了是否可以设置 html5 音频标签的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有找到任何关于如何做到这一点的资源.像改变播放器的颜色这样简单的事情会很好:)

I haven't found any resources on how to do that. Something as simple as changing the color of the player would be nice to have :)

推荐答案

是的!带有controls"属性的 HTML5 音频标签使用浏览器的默认播放器.您可以不使用浏览器控件,而是滚动您自己的控件并通过 javascript 与音频 API 对话,从而根据自己的喜好对其进行自定义.

Yes! The HTML5 audio tag with the "controls" attribute uses the browser's default player. You can customize it to your liking by not using the browser controls, but rolling your own controls and talking to the audio API via javascript.

幸运的是,其他人已经这样做了.我现在最喜欢的播放器是 jPlayer,它非常有风格并且效果很好.看看吧.

Luckily, other people have already done this. My favorite player right now is jPlayer, it is very stylable and works great. Check it out.

这篇关于是否可以设置 html5 音频标签的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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