如何内嵌显示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/