Commit f93a8e52 by doszhang

dos

parent 30a2efd6
......@@ -86,6 +86,17 @@ let oldRandFlag = [];
let first = true;
let startX;
let timer;
let mainColor = 'red';
let colorList = {
'red': [
'#854337',
'#984534',
'#b02318',
'#e5382a',
'#fa675c',
'#ffbaaf'
]
}
const fontSize = parseFloat($('html').css('fontSize'));
let flagTemplate = $('.flag-page .flag-frame').find('.flag-block').clone();
......@@ -144,22 +155,23 @@ function chooseColorMove(e) {
} else if (left > 26.62) {
left = 26.62;
}
let index = 0;
if (left < 6.59) {
console.log(1);
index = 1;
} else if (left > 6.59 && left < 11) {
console.log(2);
index = 2;
} else if (left > 11 && left < 15.46) {
console.log(3);
index = 3;
} else if (left > 15.46 && left < 19.91) {
console.log(4);
index = 4;
} else if (left > 19.91 && left < 24.38) {
console.log(5);
index = 5;
} else if (left > 24.38) {
console.log(6);
index = 6;
}
$('.personal-page .bg').css('background', colorList[mainColor][index]);
$('.personal-page .btn-choose-color').css('left', left + 'rem');
startX = moveX;
}, 5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment