Files
love-key-web/src/components/PageAdvantage.vue
2026-02-27 18:49:14 +08:00

250 lines
4.8 KiB
Vue

<template>
<section class="page page-advantage">
<div class="content-wrapper">
<div class="image-side">
<img src="/src/assets/images/three-phone.png" class="phone-img anim-item" />
</div>
<div class="text-side">
<h2 class="section-title anim-item">
Every opening is an<br />
unknown encounter.
</h2>
<div class="section-card anim-item">
<img src="/src/assets/images/three-douhao.png" class="douhao-img">
<p class="section-desc anim-item">
Every moment you open it, you embark on a poetic encounter with the unknown, and meet the unexpected beauty.
</p>
<div class="hero-buttons">
<a href="#"><img src="/src/assets/images/android.png" class="btn-img" /></a>
<a href="#"><img src="/src/assets/images/appStore.png" class="btn-img" /></a>
</div>
</div>
</div>
</div>
<div class="deco deco-1">💎</div>
<div class="deco deco-2">🎁</div>
</section>
</template>
<script setup>
</script>
<style scoped lang="less">
.page-advantage {
width: 100%;
height: 100vh;
background: #ffffff;
color: #222;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
.content-wrapper {
display: flex;
align-items: center;
justify-content: center;
gap: @gap-section;
max-width: @content-max;
width: 100%;
padding: 0 @gap-content;
}
.text-side { flex: 1; }
.section-title {
font-size: @font-title;
font-weight: 800;
line-height: 1.25;
margin-bottom: clamp(12px, 1.2vh, 28px);
color: #1a1a1a;
margin-left: -25%;
}
.section-card{
position: relative;
width: clamp(400px, 32vw, 1600px);;
height: clamp(200px, 16vw, 800px);
background: #FFFFFF;
box-shadow: 0px 39px 113px 0px rgba(2,190,172,0.2);
border-radius: 2px 100px 2px 2px;
padding: 10% ;
margin-left: -38%;
font-size: @font-desc;
line-height: 1.8;
color: #888;
.douhao-img{
position: absolute;
height: 20%;
left: 40%;
top: 15%;
}
}
.hero-buttons {
display: flex;
gap: clamp(10px, 3vw, 35px);
margin-top: 20px;
}
.btn-img {
height: clamp(36px, 6.6vh, 120px);
width: auto;
display: block;
transition: transform 0.3s;
&:hover {
transform: translateY(-2px);
}
}
.image-side {
flex: 1;
display: flex;
justify-content: center;
}
.phone-img {
height: clamp(320px, 75vh, 800px);
width: auto;
display: block;
}
.phone-placeholder {
width: @phone-w-main;
height: @phone-h-main;
border: 2px dashed #ddd;
border-radius: clamp(16px, 1.5vw, 36px);
display: flex;
align-items: center;
justify-content: center;
color: #bbb;
font-size: @font-small;
background: #fafafa;
}
.deco {
position: absolute;
font-size: clamp(24px, 2.5vw, 60px);
opacity: 0.15;
animation: float 3.5s ease-in-out infinite;
}
.deco-1 { top: 15%; left: 8%; animation-delay: 0.3s; }
.deco-2 { bottom: 12%; right: 10%; animation-delay: 1.2s; }
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-12px); }
}
@media (min-width: 1921px) {
.content-wrapper {
max-width: min(1600px, 86vw);
width: min(1600px, 86vw);
gap: clamp(28px, 2.4vw, 56px);
padding: 0 clamp(40px, 3vw, 86px);
justify-content: center;
}
.image-side {
flex: 0 1 min(30vw, 520px);
justify-content: center;
}
.phone-img {
height: min(82vh, 900px);
}
.text-side {
flex: 0 1 min(42vw, 760px);
}
.section-title {
margin-left: 0;
max-width: 16ch;
font-size: clamp(48px, 2.7vw, 78px);
line-height: 1.22;
}
.section-card {
width: min(100%, 700px);
min-height: clamp(240px, 19vw, 420px);
height: auto;
margin-left: 0;
padding: clamp(26px, 2.2vw, 42px);
border-radius: 16px 80px 16px 16px;
}
.section-desc {
max-width: 34ch;
}
}
@media (max-width: 768px) {
.content-wrapper {
flex-direction: column-reverse;
align-items: center;
justify-content: center;
gap: 20px;
padding: 0 20px;
}
.text-side {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.section-title {
text-align: center;
margin-left: 0;
font-size: clamp(24px, 6vw, 36px);
width: 80vw;
}
.section-card {
width: 100%;
max-width: 360px;
height: auto;
margin-left: 0;
padding: 20px;
border-radius: 16px 36px 16px 16px;
box-sizing: border-box;
}
.section-desc {
text-align: center;
}
.hero-buttons {
justify-content: center;
margin-top: 14px;
}
.btn-img {
height: clamp(34px, 6vh, 56px);
}
.image-side {
width: 100%;
display: flex;
justify-content: center;
}
.phone-img {
height: clamp(220px, 38vh, 420px);
width: auto;
display: block;
}
.deco {
display: none;
}
}
</style>