diff --git a/README.md b/README.md index d744be4..b2ff7f2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ $ npm install aplayer --save ## Quick Start ```html -
+
``` diff --git a/src/APlayer.js b/src/APlayer.js index 433e1f1..2993f54 100644 --- a/src/APlayer.js +++ b/src/APlayer.js @@ -452,6 +452,9 @@ class APlayer { if (this.music.pic) { this.element.getElementsByClassName('aplayer-pic')[0].style.backgroundImage = `url('${this.music.pic}')`; } + else { + this.element.getElementsByClassName('aplayer-pic')[0].style.backgroundImage = ''; + } this.element.getElementsByClassName('aplayer-title')[0].innerHTML = this.music.title; this.element.getElementsByClassName('aplayer-author')[0].innerHTML = ` - ${this.music.author}`; if (this.element.getElementsByClassName('aplayer-list-light')[0]) { diff --git a/src/APlayer.scss b/src/APlayer.scss index 3cd5d9c..03d920c 100644 --- a/src/APlayer.scss +++ b/src/APlayer.scss @@ -92,7 +92,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height - 6; height: $aplayer-height; width: $aplayer-height; background-image: url(./default.jpg); - background-size: 100%; + background-size: cover; transition: all 0.3s ease; .aplayer-button { @@ -457,4 +457,4 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height - 6; @keyframes aplayer-roll { 0%{left:0} 100%{left: -100%} -} \ No newline at end of file +}