-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVision.css
113 lines (94 loc) · 2.84 KB
/
Vision.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.contents{
width: 100%;
height: 40vh;
margin: 0 auto;
text-align: justify;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: rgb(19, 21, 24);
}
.parallax {
width:100%;
height: 80vh;
position: relative;
overflow: hidden;
background-repeat: no-repeat;
background-size: cover;
background-position: top center;
background-attachment: fixed;
cursor: pointer;
}
.container{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.h1 {
font-size: 70px;
font-weight: 700;
color: antiquewhite;
letter-spacing: 50px;
text-align: center;
}
.anima{
animation: identifier 1.5s ease 1s;
animation-fill-mode: forwards;
}
.parallax {
/* 其他样式 */
overflow: hidden;
position: relative;
}
.parallax .background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-size: cover;
background-position: top center;
background-attachment: fixed;
}
.container {
position: relative; /* 设置容器为相对定位 */
/* 其他样式 */
}
.painterLeft {
position: absolute; /* 设置painterLeft为绝对定位 */
top: 50%; /* 将painterLeft的顶部设置在容器的中间 */
left: 0; /* 将painterLeft的左边设置在容器的左边 */
transform: translateY(-50%);
left: -50%; /* 使用transform将painterLeft向上移动自身高度的一半,使其垂直居中 */
background-size: contain;
background-repeat: no-repeat;
background-position: center;
background-image: url('painterLeft.png');
}
.painterRight {
position: absolute; /* 设置painterRight为绝对定位 */
top: 50%; /* 将painterRight的顶部设置在容器的中间 */
right: 0; /* 将painterRight的右边设置在容器的右边 */
transform: translateY(-50%);
right: -50%; /* 使用transform将painterRight向上移动自身高度的一半,使其垂直居中 */
background-size: contain;
background-repeat: no-repeat;
background-position: center;
background-image: url('painterRight.png');
}
.painterLeft, .painterRight {
/* 其他样式 */
height: 100%; /* 设置painterLeft和painterRight的高度为100%,即与容器的高度相同 */
width: 50%; /* 设置painterLeft和painterRight的宽度为33.33%,即容器宽度的三分之一 */
}
.p1 .background {background-image: url('https://images.hdqwalls.com/wallpapers/forza-horizon-4-2019-ia.jpg')}
.p2 .background {background-image: url('https://dubaiastronomy.com/wp-content/uploads/2019/02/Venus-Horizon.jpg')}
.p3 .background {background-image: url('https://mp1st.com/wp-content/uploads/2021/07/Forza-Horizon-5-10.jpg')}