gpt4 book ai didi

html - 内联显示 mediaelement.js 音频播放器

转载 作者:行者123 更新时间:2023-11-28 06:47:18 26 4
gpt4 key购买 nike

如何内联显示 MediaElement.js 音频播放器? (被文字包围)。

我尝试编辑 CSS 未成功 here on JS Fiddle到:

CSS

.mejs-container{
position: relative; /*I tried changing this */
clear: none; /* and added this */
}
.mejs-clear {
clear:both; /* tried "none" */
}

HTML

I want the player ON the same line with the second line of text<br/>
This Line, here -> <audio id="mejs-player" src="http://mediaelementjs.com/media/AirReview-Landmarks-02-ChasingCorporate.mp3" type="audio/mp3" controls="controls"></audio> <br/>
Not This Line.

JavaScript

$('#mejs-player').mediaelementplayer({
// API options
features: ['playpause','progress','duration','tracks'],
audioWidth: 200,
alwaysShowControls: true,
});

最佳答案

在 .mejs-container 的 css 中添加一行就可以了

display:inline-block;

http://jsfiddle.net/link2twenty/3fog266s/2/

关于html - 内联显示 mediaelement.js 音频播放器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33971453/

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