1+ : root {
2+ --left-bg-color : rgba (87 , 84 , 236 , 0.7 );
3+ --right-bg-color : rgba (43 , 43 , 43 , 0.8 );
4+ --left-btn-hovercolor : rgba (87 , 84 , 236 , 1 );
5+ --right-btn-hovercolor : rgba (28 , 122 , 28 , 1 );
6+ --hover-width : 75% ;
7+ --other-width : 25% ;
8+ --speed : 1000ms ;
9+ }
10+
111* {
2- box-sizing : border-box;
12+ box-sizing : border-box;
13+ }
14+
15+ body {
16+ font-family : Georgia, 'Times New Roman' , Times, serif;
17+ margin : 0 ;
18+ overflow-x : hidden;
19+ height : 100vh ;
20+ padding : 20px ;
21+ }
22+
23+ h1 {
24+ font-size : 3rem ;
25+ color : # fff ;
26+ position : absolute;
27+ left : 50% ;
28+ top : 20% ;
29+ transform : translateX (-50% );
30+ white-space : nowrap;
31+ }
32+
33+ .btn {
34+ position : absolute;
35+ display : flex;
36+ align-items : center;
37+ justify-content : center;
38+ left : 50% ;
39+ top : 40% ;
40+ transform : translateX (-50% );
41+ text-decoration : none;
42+ color : # fff ;
43+ border : # fff solid 0.2rem ;
44+ font-size : 1rem ;
45+ font-weight : bold;
46+ text-transform : uppercase;
47+ width : 15rem ;
48+ padding : 1.5rem ;
49+ }
50+
51+ .container {
52+ position : relative;
53+ width : 100% ;
54+ height : 100% ;
55+ background : # 333 ;
56+ }
57+
58+ .split {
59+ position : absolute;
60+ width : 50% ;
61+ height : 50% ;
62+ overflow : hidden;
63+ }
64+
65+ .split .left {
66+ left : 0 ;
67+ background : url(./ assets/ps5.webp);
68+ background-repeat : no-repeat;
69+ background-size : cover;
70+ height : 100% ;
71+ }
72+
73+ .split .left ::before {
74+ content : '' ;
75+ position : absolute;
76+ width : 100% ;
77+ height : 100% ;
78+ background-color : var (--left-bg-color );
79+ }
80+
81+ .split .left .btn : hover {
82+ background-color : var (--left-btn-hovercolor );
83+ border-color : var (--left-btn-hovercolor );
84+ }
85+
86+ .split .right {
87+ right : 0 ;
88+ background : url(./ assets/boxseries.jpeg);
89+ background-repeat : no-repeat;
90+ background-size : cover;
91+ height : 100% ;
92+ }
93+
94+ .split .right ::before {
95+ content : '' ;
96+ position : absolute;
97+ width : 100% ;
98+ height : 100% ;
99+ background-color : var (--right-bg-color );
100+ }
101+
102+ .split .right .btn : hover {
103+ background-color : var (--right-btn-hovercolor );
104+ border-color : var (--right-btn-hovercolor );
105+ }
106+
107+ .split .left ,
108+ .split .right ,
109+ .split .right ::before ,
110+ .split .left ::before {
111+ transition : all var (--speed ) ease-in-out;
112+ }
113+
114+ .hover-left .left {
115+ width : var (--hover-width );
116+ }
117+
118+ .hover-left .right {
119+ width : var (--other-width );
120+ }
121+
122+ .hover-right .right {
123+ width : var (--hover-width );
124+ }
125+
126+ .hover-right .left {
127+ width : var (--other-width );
128+ }
129+
130+ @media (max-width : 800px ) {
131+ h1 {
132+ font-size : 2rem ;
133+ top : 30% ;
3134 }
4-
5- body {
6- font-family : Georgia, 'Times New Roman' , Times, serif;
7- margin : 0 ;
8- overflow-x : hidden;
9- height : 100vh ;
10- padding : 20px ;
11- }
135+
136+ .btn {
137+ padding : 1.2rem ;
138+ width : 12rem ;
139+ }
140+ }
0 commit comments