style of aplayer-time-narrow

This commit is contained in:
DIYgod 2016-03-28 01:29:40 +08:00
parent b626991dcb
commit ccfb471d24
5 changed files with 18 additions and 5 deletions

File diff suppressed because one or more lines are too long

2
dist/APlayer.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -208,6 +208,9 @@
this.element.innerHTML = eleHTML;
console.log(this.element.getElementsByClassName('aplayer-info')[0].offsetWidth);
if (this.element.getElementsByClassName('aplayer-info')[0].offsetWidth < 200) {
this.element.getElementsByClassName('aplayer-time')[0].classList.add('aplayer-time-narrow');
}
// fix the width of aplayer bar
this.element.getElementsByClassName('aplayer-bar-wrap')[0].style.marginRight = this.element.getElementsByClassName('aplayer-time')[0].offsetWidth + 5 + 'px';

View File

@ -246,7 +246,7 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
transition: all 0.2s ease;
&.aplayer-icon-loop {
margin: 2px;
margin-right: 4px;
}
&.aplayer-noloop {
color: #ddd;
@ -259,12 +259,22 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
color: #000;
}
}
&.aplayer-time-narrow {
.aplayer-icon-loop {
display: none;
}
.aplayer-icon-menu {
display: none;
}
}
}
.aplayer-volume-wrap {
position: relative;
display: inline-block;
margin-left: 7px;
margin-left: 3px;
cursor: pointer !important;
&:hover .aplayer-volume-bar-wrap {