Skip to content

Commit 00aac89

Browse files
committed
Merge branch 'master' of github.com:bugkiwi/APlayer
2 parents 1fd103c + 6b252a2 commit 00aac89

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $ npm install aplayer --save
4747
## Quick Start
4848

4949
```html
50-
<div id="aplayer1"></div>
50+
<div id="aplayer1" class="aplayer"></div>
5151
<script src="dist/APlayer.min.js"></script>
5252
```
5353

src/APlayer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ class APlayer {
452452
if (this.music.pic) {
453453
this.element.getElementsByClassName('aplayer-pic')[0].style.backgroundImage = `url('${this.music.pic}')`;
454454
}
455+
else {
456+
this.element.getElementsByClassName('aplayer-pic')[0].style.backgroundImage = '';
457+
}
455458
this.element.getElementsByClassName('aplayer-title')[0].innerHTML = this.music.title;
456459
this.element.getElementsByClassName('aplayer-author')[0].innerHTML = ` - ${this.music.author}`;
457460
if (this.element.getElementsByClassName('aplayer-list-light')[0]) {

src/APlayer.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height - 6;
9292
height: $aplayer-height;
9393
width: $aplayer-height;
9494
background-image: url(./default.jpg);
95-
background-size: 100%;
95+
background-size: cover;
9696
transition: all 0.3s ease;
9797

9898
.aplayer-button {
@@ -457,4 +457,4 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height - 6;
457457
@keyframes aplayer-roll {
458458
0%{left:0}
459459
100%{left: -100%}
460-
}
460+
}

0 commit comments

Comments
 (0)