File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ] ) {
Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments