请问我这个Services.vue渲染出来的页面为什么会出现文字自动左右翻转的情况。
刚开始页面如下:
然后自己变成了:
我的代码为:
<template>
<header>
<Navbar></Navbar>
</header>
<main>
<div class="container">
<div class="destination__container">
<img class="bg__img__1" src="../assets/bg-dots.png" alt="bg" />
<img class="bg__img__2" src="../assets/bg-arrow.png" alt="bg" />
<div class="content">
<h1>网站<br />小程序<br />APP开发<br /></h1>
<p>
26道严谨流程管控项目。
</p>
<button class="btn">了解更多</button>
</div>
<div class="destination__grid">
<div class="destination__card">
<img src="../assets/口腔检查平台内页.png" alt="destination" />
<div class="card__content">
<h4>数字化X射线口腔检查平台</h4>
<p>
为口腔医院专门打造平台,采用业界领先“金属伪影”检查算法赋能口腔检查领域。
</p>
<button class="btn">了解更多</button>
</div>
</div>
<div class="destination__card">
<img src="../assets/加油站网页登录页.png" alt="destination" />
<div class="card__content">
<h4>智慧加油站安全监测系统</h4>
<p>
配备可视化视频流监测网页和声光预警功能,一站式解决加油站作业中的安全隐患问题。
</p>
<button class="btn">了解更多</button>
</div>
</div>
<div class="destination__card">
<img src="../assets/智慧医疗内页.png" alt="destination" />
<div class="card__content">
<h4>腺样体辅助诊疗系统</h4>
<p>
从算法模型,到软件框架,再到硬件支持,我们提供了一体化系统性的解决方案。
</p>
<button class="btn">了解更多</button>
</div>
</div>
</div>
</div>
</div>
</main>
</template>
<script>
import Navbar from '@/components/Navbar.vue';
export default {
name: 'services',
components: {
Navbar
}
}
</script>
<style>
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");
:root {
--primary-color: #00605f;
--secondary-color: #017479;
--text-dark: #0f172a;
--text-light: #94a3b8;
--white: #ffffff;
--max-width: 1400px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Montserrat", sans-serif;
background: linear-gradient(to right,
rgba(2, 82, 89, 0.9),
rgba(255, 255, 255, 0)),
url("../assets/bg.avif");
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
}
.container {
max-width: var(--max-width);
min-height: 100vh;
margin: auto;
padding: 1rem;
display: flex;
flex-direction: column;
}
.destination__container {
position: relative;
padding: 5rem 0 5rem 5rem;
flex: 1;
display: grid;
grid-template-columns: 1fr 2fr;
gap: 2rem;
align-items: center;
}
.bg__img__1 {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-100%);
opacity: 0.6;
z-index: -1;
}
.bg__img__2 {
position: absolute;
bottom: 2rem;
right: 50%;
transform: translateX(100%);
opacity: 0.8;
z-index: -1;
}
.content h1 {
margin-bottom: 1rem;
font-size: 4.5rem;
font-weight: 800;
color: var(--white);
}
.content h1 span {
-webkit-text-stroke: 2px var(--white);
-webkit-text-fill-color: transparent;
}
.content p {
max-width: 350px;
margin-bottom: 2rem;
line-height: 1.5rem;
color: var(--white);
}
.content .btn {
padding: 0.75rem 2rem;
outline: none;
border: none;
font-size: 1rem;
font-weight: 600;
color: var(--white);
background-color: var(--secondary-color);
cursor: pointer;
}
.destination__grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.destination__card {
height: 100%;
background-color: var(--white);
box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.7);
}
.destination__card img {
width: 100%;
}
.card__content {
padding: 1rem;
}
.card__content h4 {
margin-bottom: 0.5rem;
font-size: 1.2rem;
font-weight: 600;
color: var(--text-dark);
}
.card__content p {
margin-bottom: 1rem;
font-size: 0.9rem;
line-height: 1.5rem;
color: var(--text-light);
}
.card__content .btn {
padding: 0.5rem 1rem;
outline: none;
border: none;
font-weight: 500;
color: var(--white);
background-color: var(--primary-color);
cursor: pointer;
}
@media (width < 1200px) {
.search {
max-width: 235px;
}
.destination__container {
grid-template-columns: 1fr;
}
}
@media (width < 900px) {
.nav__links {
display: none;
}
.content h1 {
font-size: 4rem;
}
.destination__grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (width < 600px) {
.search {
display: none;
}
.destination__container {
padding-left: 3rem;
}
.content h1 {
font-size: 3rem;
}
.destination__grid {
grid-template-columns: repeat(1, 1fr);
}
}
</style>