9d872915 by joe

首页banner修改

1 parent f8a6ed3a
......@@ -7,7 +7,8 @@
z-index: 11;
.header-container {
max-width: 950px;
// max-width: 950px;
max-width: 1024px;
height: 100%;
margin: auto;
display: flex;
......
......@@ -9,16 +9,23 @@ export default {
return {
key: 'value',
swiperOption: {
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
// navigation: {
// nextEl: '.swiper-button-next',
// prevEl: '.swiper-button-prev'
// },
pagination: {
el: '.swiper-pagination',
// renderBullet(index, className) {
// return `<span class="${className} swiper-pagination-bullet-custom">${index + 1}</span>`
// }
}
},
autoplay: {
delay: 5000,
stopOnLastSlide: false,
disableOnInteraction: false
},
speed: 1000,
}
}
},
......
......@@ -13,26 +13,40 @@
}
// banner 轮播
.banner {
box-shadow: 0 0 1.75rem 0 rgba(255, 87, 0, 0.1);
.banner-contaner {
height: 360px;
}
.banner {
// box-shadow: 0 0 1.75rem 0 rgba(255, 87, 0, 0.1);
position: absolute;
left: 50%;
margin-left: -960px;
top: 0;
width: 1920px;
height: 100%;
overflow: hidden;
&-img {
width: 100%;
height: 100%;
}
}
// 推荐产品
.recommend {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: auto;
// flex-wrap: wrap;
// justify-content: center;
// width: auto;
text-align: center;
justify-content: space-between;
max-width: 1200px;
&-item {
margin-top: 2.25rem;
position: relative;
// width: 25.833333rem;
width: 25.833333rem;
border-radius: .75rem;
box-shadow: 0 0 1.5rem 0 rgba(255, 87, 0, 0.15);
background-color: #fbfbfb;
......@@ -155,7 +169,6 @@
}
}
.swiper-button-prev {
background-image: url('~@/assets/images/common/button-prev.png');
}
......
<template>
<div class="content">
<div class="top-space"></div>
<div>
<div class="banner-contaner">
<!-- banner 轮播 -->
<div class="box-w banner">
<div class="banner">
<swiper :options="swiperOption">
<swiper-slide>
<img class="banner-img" src="@/assets/images/index/banner.png">
<img class="banner-img" src="@/assets/images/index/banner-01.jpg">
</swiper-slide>
<swiper-slide>
<img class="banner-img" src="@/assets/images/index/banner-02.jpg">
</swiper-slide>
<div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
</div>
</div>
<div class="content">
<!-- 推荐产品 -->
<div class="box recommend">
<div class="recommend-item">
......@@ -104,6 +109,7 @@
</div>
</div>
</div>
</div>
</template>
<script src="./index.js"></script>
......