fix aplayer-bar width

This commit is contained in:
DIYgod
2016-10-11 10:02:15 +08:00
parent 58a53e324c
commit 89992c84c9
4 changed files with 9 additions and 7 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -76,7 +76,7 @@ class APlayer {
const sec = parseInt(second - min * 60);
const hours = parseInt(min / 60);
const minAdjust = parseInt((second / 60) - (60 * parseInt((second / 60) / 60)));
return second >= 3600? add0(hours) + ':' + add0(minAdjust) + ':' + add0(sec) : add0(min) + ':' + add0(sec);
return second >= 3600 ? add0(hours) + ':' + add0(minAdjust) + ':' + add0(sec) : add0(min) + ':' + add0(sec);
};
// save lrc
@@ -222,7 +222,6 @@ class APlayer {
// fix the width of aplayer bar
let bar = {};
bar.barWrap = this.element.getElementsByClassName('aplayer-bar-wrap')[0];
bar.barWrap.style.marginRight = this.element.getElementsByClassName('aplayer-time')[0].offsetWidth + 5 + 'px';
// switch to narrow style
if (this.option.narrow) {
+6 -3
View File
@@ -148,11 +148,13 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
.aplayer-controller {
position: relative;
display: flex;
.aplayer-bar-wrap {
margin: 0 140px 0 5px;
margin: 0 0 0 5px;
padding: 4px 0;
cursor: pointer !important;
flex: 1;
.aplayer-bar {
position: relative;
@@ -194,12 +196,13 @@ $aplayer-height-lrc: $aplayer-height + $lrc-height;
}
.aplayer-time {
position: absolute;
position: relative;
right: 0;
bottom: -3px;
bottom: 3px;
height: 17px;
color: #999;
font-size: 11px;
padding-left: 7px;
.aplayer-time-inner {
vertical-align: middle;