-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
126 lines (111 loc) · 2.36 KB
/
style.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
114
115
116
117
118
119
120
121
122
123
124
125
126
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200;300;400;500;600&display=swap');
:root{
--left-bg-color: rgba(99, 99, 198, 0.6);
--right-bg-color: rgba(43, 43, 43, 0.8);
--left-btn-hover-color: rgba(77, 77, 178, 1);
--right-btn-hover-color: rgba(28, 123, 28, 1);
--hover-width: 70%;
--other-width: 30%;
}
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Dosis', sans-serif;
height: 100vh;
}
.container {
position: relative;
background: #333;
width: 100%;
height: 100%;
}
.split {
position: absolute;
color: #fff;
width: 50%;
height: 100%;
overflow: hidden;
}
.split.left {
background: url(/playstation5.jpg);
background-repeat: no-repeat;
background-size: cover;
left: 0;
}
.split.left::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: var(--left-bg-color);
}
.split.right {
background: url(/xbox\ x.jpg);
background-repeat: no-repeat;
background-size: cover;
right: 0;
}
.split.right::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: var(--right-bg-color);
}
.split.left, .split.left::before, .split.right, .split.right::before {
transition: all 0.4s ease-in-out 0.255ms;
}
h1 {
position: absolute;
top: 30%;
left: 50%;
transform: translateX(-50%);
font-size: clamp(1.5rem, 5vw, 5rem);
white-space: nowrap;
}
.btn {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%);
border: 1px solid #fff;
text-decoration: none;
font-size: 1em;
padding: 1.5rem;
width: 15rem;
color: #fff;
text-align: center;
text-transform: uppercase;
transition: 0.4s;
}
.split.left .btn:hover {
background: var(--left-btn-hover-color);
border-color: var(--left-btn-hover-color);
}
.split.right .btn:hover {
background: var(--right-btn-hover-color);
border-color: var(--right-btn-hover-color);
}
.hover-left .left{
width: var(--hover-width);
}
.hover-left .right{
width: var(--other-width);
}
.hover-right .right{
width: var(--hover-width);
}
.hover-right .left{
width: var(--other-width);
}
@media(max-width:729px) {
.btn {
font-size: 1em;
padding: 1rem;
width: 8rem;
top: 45%;
}
}