console
var clientHeight = document.documentElement.clientHeight;
$(window).on('resize', function() {
var nowClientHeight = document.documentElement.clientHeight;
if (clientHeight > nowClientHeight) {
$(".loginpage-foot").hide();
$(".loginpage-header").animate({
'height': '120px'
},
200);
} else {
$(".loginpage-foot").show();
$(".loginpage-header").animate({
'height': '210px'
},
300);
}
});
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
<div class="loginpage-header">
<div class="loginpage-title">
苏州苏嘉杭高速公路有限公司
</div>
<div>
--固定资产
</div>
</div>
<div class="loginform-wrapper">
<input type="text" placeholder="请输入用户名" />
<input type="password" placeholder="请输入密码" />
<a href="javascript:;" class="weui-btn weui-btn_primary">
登 陆
</a>
</div>
<div class="loginpage-foot">
Copyright © 苏州路森交通科技有限公司
</div>
body {
margin: 0;
padding: 0;
background-color: #f9f9f9;
color: #a7a5a5;
font-family: "微软雅黑";
}
.loginpage-header {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 210px;
padding: 0;
background: #0f88eb;
background-image: url(http://sandbox.runjs.cn/uploads/rs/234/bxxwrmn8/ml.png);
background-size: 100%;
color: #fff;
}
.loginpage-title {
font-size: 21px!important;
font-weight: 700;
margin-bottom: 5px;
}
.loginform-wrapper {
padding: 20px 16px;
text-align: center;
background-color: white;
}
.loginform-wrapper input {
width: 90%;
height: 40px;
text-indent: 15px;
border: none;
border-bottom: 1px solid #e7eaf1;
outline: none;
}
.loginform-wrapper a {
width: 90%;
height: 40px;
line-height: 40px;
margin-top: 30px;
font-size: 16px;
border-radius: 4px;
border: none;
outline: none;
}
.loginpage-foot {
position: absolute;
bottom: 8px;
left: 0;
right: 0;
text-align: center;
font-size: 12px;
color: #a7a5a5;
background-color: #f9f9f9;
}