内联显示 mediaelement.js 个音频播放器
Display mediaelement.js audio player inline
如何内联显示 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;
如何内联显示 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;