Merge branch 'master' of github.com:bugkiwi/APlayer

This commit is contained in:
gkiwi 2017-11-14 19:07:21 +08:00
commit 00aac89320
3 changed files with 6 additions and 3 deletions

View File

@ -47,7 +47,7 @@ $ npm install aplayer --save
## Quick Start
```html
<div id="aplayer1"></div>
<div id="aplayer1" class="aplayer"></div>
<script src="dist/APlayer.min.js"></script>
```

View File

@ -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]) {

View File

@ -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%}
}
}