Commit 14d8f47a by doszhang

dos

parent b3dba7da
...@@ -138,23 +138,26 @@ function checkInfo() { ...@@ -138,23 +138,26 @@ function checkInfo() {
} }
function initPage() { function initPage() {
const transformTop = (parseFloat(getTranslateDistance()));
$('.top').css('top', transformTop + 'px');
$('.bottom').css({
top: 'auto',
bottom: transformTop - 2 + 'px'
});
if (transformTop + 179 > 243) {
$('.upload-page .logo').css('top', transformTop + 183 + 'px');
}
const displacement = parseFloat(getTranslateDistance()); const displacement = parseFloat(getTranslateDistance());
if (displacement + 179 > 243) {
$('.upload-page .logo').css('top', displacement + 183 + 'px');
}
if (displacement > 0) { if (displacement > 0) {
const scale = document.documentElement.clientHeight / $('.page').height(); const scale = document.documentElement.clientHeight / $('.page').height();
$('.wrap-inner').css({ $('.wrap-inner').css({
'transform': 'translate(0%,-50%) scale(1,' + scale + ')' 'transform': 'translate(0%,-50%) scale(1,' + scale + ')'
}); });
$('.top').css('top', '0px');
$('.bottom').css({
top: 'auto',
bottom: '0px'
});
} else {
$('.top').css('top', -displacement + 'px');
$('.bottom').css({
top: 'auto',
bottom: -displacement - 2 + 'px'
});
} }
// const headerHeight = 313; // const headerHeight = 313;
// const logoHeight = parseFloat($('.logo').css('height')); // const logoHeight = parseFloat($('.logo').css('height'));
......
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