This commit is contained in:
huangjinming 2023-03-02 16:56:59 +08:00
parent b99ba388ad
commit 0403d871ec
20 changed files with 68 additions and 54 deletions

View File

@ -1,23 +1,23 @@
module.exports = { // module.exports = {
plugins: { // plugins: {
'postcss-px-to-viewport': { // 'postcss-px-to-viewport': {
unitToConvert: 'px', // 需要转换的单位,默认为"px" // unitToConvert: 'px', // 需要转换的单位,默认为"px"
viewportWidth: 1920, // 设计稿的视口宽度 // viewportWidth: 1920, // 设计稿的视口宽度
unitPrecision: 5, // 单位转换后保留的精度 // unitPrecision: 5, // 单位转换后保留的精度
propList: ['*'], // 能转化为vw的属性列表 // propList: ['*'], // 能转化为vw的属性列表
viewportUnit: 'vw', // 希望使用的视口单位 // viewportUnit: 'vw', // 希望使用的视口单位
fontViewportUnit: 'vw', // 字体使用的视口单位 // fontViewportUnit: 'vw', // 字体使用的视口单位
selectorBlackList: [], // 需要忽略的CSS选择器不会转为视口单位使用原有的px等单位。 // selectorBlackList: [], // 需要忽略的CSS选择器不会转为视口单位使用原有的px等单位。
minPixelValue: 1, // 设置最小的转换数值如果为1的话只有大于1的值会被转换 // minPixelValue: 1, // 设置最小的转换数值如果为1的话只有大于1的值会被转换
mediaQuery: false, // 媒体查询里的单位是否需要转换单位 // mediaQuery: false, // 媒体查询里的单位是否需要转换单位
replace: true, // 是否直接更换属性值,而不添加备用属性 // replace: true, // 是否直接更换属性值,而不添加备用属性
exclude: undefined, // 忽略某些文件夹下的文件或特定文件,例如 'node_modules' 下的文件 // exclude: undefined, // 忽略某些文件夹下的文件或特定文件,例如 'node_modules' 下的文件
include: undefined, // 如果设置了include那将只有匹配到的文件才会被转换 // include: undefined, // 如果设置了include那将只有匹配到的文件才会被转换
landscape: false, // 是否添加根据 landscapeWidth 生成的媒体查询条件 @media (orientation: landscape) // landscape: false, // 是否添加根据 landscapeWidth 生成的媒体查询条件 @media (orientation: landscape)
landscapeUnit: 'vw', // 横屏时使用的单位 // landscapeUnit: 'vw', // 横屏时使用的单位
landscapeWidth: 1920 // 横屏时使用的视口宽度 // landscapeWidth: 1920 // 横屏时使用的视口宽度
} // }
} // }
} // }

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

View File

@ -26,7 +26,7 @@
</XyzTransitionGroup> </XyzTransitionGroup>
</div> </div>
</transition> </transition>
<div class="btn-demo"> </div> <!-- <div class="btn-demo"> </div> -->
</div> </div>
<div class="game-bg"> <div class="game-bg">
<img src="@/assets/img/home/weapon-bg.jpg" alt="" /> <img src="@/assets/img/home/weapon-bg.jpg" alt="" />
@ -65,7 +65,7 @@ function handactiveTab(index) {
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
position: relative; position: relative;
height: 1080px; // height: 1080px;
.tabs { .tabs {
width: 1440px; width: 1440px;
margin: 0 auto; margin: 0 auto;

View File

@ -42,7 +42,7 @@
> >
<SwiperSlide v-for="(item, index) in heroList" :key="index"> <SwiperSlide v-for="(item, index) in heroList" :key="index">
<XyzTransitionGroup class="item-group" xyz="fade ease"> <XyzTransitionGroup class="item-group" xyz="fade ease">
<div class="hero-big-img"> <div class="hero-big-img" :class="index >= 7 ? 'man-bg' :'woman-bg'">
<img <img
class="hero_big_image" class="hero_big_image"
v-if="activeIndex == index" v-if="activeIndex == index"
@ -58,13 +58,10 @@
> >
<img src="@/assets/img/home/hero-swiper-bg.png" alt="" /> <img src="@/assets/img/home/hero-swiper-bg.png" alt="" />
</div> --> </div> -->
<div <div class="swiper-btn2-prev">
class="swiper-btn2-prev"
:class="activeIndex == 0 ? 'swiper-button-disabled' : ''"
>
<img src="@/assets/img/home/next.png" alt="" /> <img src="@/assets/img/home/next.png" alt="" />
</div> </div>
<div class="swiper-btn2-next" :class="activeIndex == 9 ? '' : ''"> <div class="swiper-btn2-next">
<img src="@/assets/img/home/prev.png" alt="" /> <img src="@/assets/img/home/prev.png" alt="" />
</div> </div>
</div> </div>
@ -261,40 +258,57 @@ function test(index, sc) {
width: 854px; width: 854px;
height: 903px; height: 903px;
position: relative; position: relative;
left: 700px; left: 740px;
.hero-big-img {
display: flex;
justify-content: center;
align-items: center;
}
img {
max-width: 100%;
height: auto;
object-fit: cover;
}
.swiper-btn2-prev { .swiper-btn2-prev {
position: absolute; position: absolute;
top: 70px; top: 70px;
right: 140px; right: 280px;
z-index: 6; width: 50px;
height: 50px;
z-index: 10;
cursor: pointer; cursor: pointer;
} }
.swiper-btn2-next { .swiper-btn2-next {
position: absolute; position: absolute;
top: 70px; top: 70px;
right: 40px; right: 179px;
z-index: 6; width: 50px;
height: 50px;
z-index: 10;
cursor: pointer; cursor: pointer;
} }
.hero-big-img {
width: 854px;
position: relative;
height: 903px;
bottom: 0;
display: flex;
// justify-content: center;
// align-items: center;
}
img {
position: absolute;
bottom: 0;
max-width: 100%;
height: auto;
object-fit: cover;
}
// .swiper-button-disabled { // .swiper-button-disabled {
// opacity: 0.5; // opacity: 0.5;
// pointer-events: none; // pointer-events: none;
// cursor:not-allowed // cursor:not-allowed
// } // }
} }
.woman-bg{
background: url('@/assets/img/home/hero/hero-bg.png')no-repeat;
background-position: center bottom;
}
.man-bg{
background: url('@/assets/img/home/hero/hero-active-bg.png')no-repeat;
background-position:center bottom;
}
.hero_big_image { .hero_big_image {
} }
.hero-right { .hero-right {
position: relative; position: relative;

View File

@ -24,7 +24,7 @@
@swiper="setWeaponThumbsSwiper" @swiper="setWeaponThumbsSwiper"
:slides-per-view="4" :slides-per-view="4"
:modules="modules" :modules="modules"
:space-between="23" :space-between="20"
class="weaponThumbs" class="weaponThumbs"
:slideToClickedSlide="true" :slideToClickedSlide="true"
:centeredSlidesBounds="true" :centeredSlidesBounds="true"
@ -138,9 +138,9 @@ function test(index, sc) {
user-select: none; user-select: none;
position: relative; position: relative;
// padding: 0 40px; // padding: 0 40px;
width: 940px;
width: 1440px;
height: 200px; height: 200px;
margin: 0 auto;
.swiper-button-prev::after { .swiper-button-prev::after {
display: none; display: none;
} }
@ -149,15 +149,15 @@ function test(index, sc) {
} }
.swiper-button-prev-btn { .swiper-button-prev-btn {
position: absolute; position: absolute;
left:150px; left:-120px;
top: -180px; top:-280px;
z-index: 5; z-index: 5;
} }
.swiper-button-next-btn { .swiper-button-next-btn {
position: absolute; position: absolute;
right: 150px; z-index: 6;
z-index: 5; right: -120px;
top:-180px; top:-280px;
} }
.swiper-button-disabled { .swiper-button-disabled {