在我的網站,我只是做了我自己的按鈕,這是在作爲窗口小部件的iframe同一容器和應用一些CSS規則給它。
HTML:
<div id="playerContainer">
<span id="closePlayer" class="glyphicon glyphicon-remove"></span>
<iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/164855780&amp;color=5ab7e6&amp;auto_play=true&hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false" style="display: inline;"></iframe>
</div>
CSS:
#closePlayer {
position: fixed;
bottom: 142px;
right: 3px;
z-index: 999;
}
JS(包括jQuery的):
document.getElementById('closePlayer').addEventListener('click', function() {
$(this).parent().fadeOut(400, function() {
$(this).remove();
});
});
它的樣子:http://i.imgur.com/4HJr4HX.png
我知道這是出版了,而但我剛剛看到它,希望它能幫助你omebody :)