html 5音频标签宽度 [英] html 5 audio tag width
问题描述
我想知道是否可以设置音频标签的宽度。默认情况下它不是受支持的功能,因此hacks将被愉快地接受。
我已经尝试将它们放在小div和表中,但这看起来不是很顺利......至于我可以看到,我是唯一一个困扰它的人,但我真的很感谢一些帮助。
不需要跨平台/浏览器支持;只要FireFox(3.6 ++)支持它,我就很高兴。
关于我将要使用的内容的快速示例:
< audio preload =autoid =id12controls =controlsonended =func12(); SRC = http://192.168.1.68/mymusic.wav >< /音频>
设置方法与设置宽度相同任何其他HTML元素,与CSS:
audio {width:200px; }
请注意 audio
是一个内联元素默认情况下,在Firefox中,您可能还想将其设置为 display:block
。 下面是一个例子。
I was wondering if it's possible to set the width of the audio tag. It is not a supported feature by default, so "hacks" will be happily accepted.
I already tried putting them in small div's and tables, but that doesn't look very smooth... As far as I can see, I'm the only one bothering about it, but I really appreciate some help
There is no need for cross-platform/browser support; I'm happy as long as FireFox (3.6 ++) supports it.
Quick example as to what I'll be using:
<audio preload="auto" id="id12" controls="controls" onended="func12();" src="http://192.168.1.68/mymusic.wav"></audio>
Set it the same way you'd set the width of any other HTML element, with CSS:
audio { width: 200px; }
Note that audio
is an inline element by default in Firefox, so you might also want to set it to display: block
. Here's an example.
这篇关于html 5音频标签宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!