Commit 10449354 by doszhang

dos

parent da921fcf
......@@ -116,30 +116,9 @@ const originalHeight = document.documentElement.clientHeight || document.body.cl
$(document).ready(function () {
// $('.logo').css('top', getTranslateDistance(40, true));
$("input").on("focus blur", function () {
// window.scroll(0, 0); //失焦后强制让页面归位
setTimeout(function () {
var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
alert(resizeHeight);
}, 2000)
$("input").on("blur", function () {
window.scroll(0, 0); //失焦后强制让页面归位
});
window.οnresize = function () {
alert(1);
// //键盘弹起与隐藏都会引起窗口的高度发生变化
// var resizeHeight = document.documentElement.clientHeight || document.body.clientHeight;
// if ((resizeHeight) < (originalHeight)) {
// //当软键盘弹起,在此处操作
// if (browser.versions.android && ($('input[name=name]').is(":focus") || $('input[name=business]').is(":focus"))) {
// alert(resizeHeight);
// }
// } else {
// //当软键盘收起,在此处操作
// if (browser.versions.android) {
// alert(resizeHeight);
// }
// }
}
$('.music').click(function () {
if ($('#music')[0].paused) {
......@@ -185,6 +164,7 @@ function initPage() {
const transformTop = parseFloat(getTranslateDistance());
let spacing = (headerHeight - transformTop - logoHeight - inputHeight) / 3;
alert(spacing)
$('.logo').css('top', transformTop + spacing + 'px');
$('.input-wrapper').css('top', transformTop + (spacing * 2 + logoHeight) + 'px');
......
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