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