gpt4 book ai didi

css - 如何在 HTML5 中设置音频面板的样式

转载 作者:行者123 更新时间:2023-11-28 00:18:17 38 4
gpt4 key购买 nike

我想设置音频面板的样式以仅显示播放按钮,而不显示音量控制和时间。我使用的代码是这样的:

<audio class="play_button" controls="" preload="none" style="width:175px" class="kskin" data-durationhint="1.55" data-startoffset="0"> <source src="audio/giraalaizquierda.ogg" type="audio/ogg; codecs=&quot;vorbis&quot;" data-title="Original Ogg file (100 kbps)" data-shorttitle="Ogg source" data-width="0" data-height="0" data-bandwidth="100377"></audio>

enter image description here

最佳答案

您无法设置 native 控件的样式。

只能省略controls属性,然后构建您自己的 UI(例如使用 <button> ),它使用 JavaScript 控制音频元素。

关于css - 如何在 HTML5 中设置音频面板的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54982726/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com