mirror of https://gitee.com/topnuomi/zxf
修改首页banner为全屏展示
This commit is contained in:
parent
9896fa329a
commit
593ec34424
|
@ -222,7 +222,6 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 7.2rem;
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
|
@ -283,7 +283,6 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 7.2rem;
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
|
@ -121,6 +121,14 @@
|
||||||
<div class="footer"></div>
|
<div class="footer"></div>
|
||||||
|
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
if (!isMobile) {
|
||||||
|
$('.main-banner .item').css('height', window.innerHeight + 'px');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -7,6 +7,7 @@ let isClose = true,
|
||||||
heaerMenuGroup = $('.menu-group'),
|
heaerMenuGroup = $('.menu-group'),
|
||||||
headerMask = $('.menu-mask'),
|
headerMask = $('.menu-mask'),
|
||||||
headerMenuBtn = $('.btn-img'),
|
headerMenuBtn = $('.btn-img'),
|
||||||
|
isMobile = $(window).width() <= 768,
|
||||||
currentRem = 0;
|
currentRem = 0;
|
||||||
|
|
||||||
function getRem() {
|
function getRem() {
|
||||||
|
@ -20,10 +21,10 @@ function rszcal() {
|
||||||
|
|
||||||
function headerEffect() {
|
function headerEffect() {
|
||||||
let t = $(document).scrollTop(), flag;
|
let t = $(document).scrollTop(), flag;
|
||||||
if ($(window).width() > 768) {
|
if (!isMobile) {
|
||||||
flag = t > 4 * currentRem;
|
flag = t > 4 * currentRem;
|
||||||
} else {
|
} else {
|
||||||
flag = t > 0.6 * currentRem;
|
flag = t > 2.5 * currentRem;
|
||||||
}
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
header.removeClass('style1').addClass('style2');
|
header.removeClass('style1').addClass('style2');
|
||||||
|
|
Loading…
Reference in New Issue