Commit 02eb8780 by doszhang

dos

parent 1d5ed14d
......@@ -74,6 +74,11 @@ body {
overflow-x: hidden;
}
.container.fix {
top: -50%;
transform: translateY(50%);
}
.page {
/* top: 50%;
transform: translate(0, -50%); */
......
......@@ -80,6 +80,8 @@ let scrollTimer,
nowShowIndex = 1,
createPosterLock = false;
let fixHeight = 0;
const guardian = [
'事事顺意守',
'健康祈愿守',
......@@ -94,15 +96,16 @@ const guardian = [
]
$(document).ready(function () {
if ($('.page').height() < document.documentElement.clientHeight) {
if ($('.page2').height() < document.documentElement.clientHeight) {
var scale = document.documentElement.clientHeight / $('.page').height();
$('.bg').css({
'transform': 'scale(1,' + scale + ')'
});
} else {
fixHeight = Math.abs($('.page').height() - document.documentElement.clientHeight) / 2;
}
$('.container').css('height', document.documentElement.clientHeight + 'px');
var fixHeight = Math.abs($('.page').height() - document.documentElement.clientHeight) / 2;
$('.logo').css('top', fixHeight + 30 + 'px');
$("input").on("blur", function () {
window.scroll(0, 0); //失焦后强制让页面归位
});
......@@ -159,7 +162,7 @@ function toscene(event) {
}
function toPage2() {
$('.container').css('overflow-x', 'scroll').css('overflow-y', 'hidden');
$('.container').css('overflow-x', 'scroll').css('overflow-y', 'hidden').addClass('fix');
$('.page1').hide();
$('.page2').show();
fireworkLock = true;
......
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