-
Notifications
You must be signed in to change notification settings - Fork 0
/
parallexscroll.html
110 lines (91 loc) · 2.56 KB
/
parallexscroll.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
position: relative;
}
.container {
position: relative;
height: 100vh;
width: 100%;
overflow-y: scroll;
}
.slides {
position: relative;
width: 100%;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
gap: 50px;
color: white;
}
.slides h2 {
font-size: 70px;
font-weight: 600;
max-width: 650px;
}
.slide1 {
background: url("images/space/beautiful-planets.jpg");
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
}
.slide2 {
background: url("images/space/planet1.jpg");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
}
.slide3 {
background: url("images/space/gallexy1.jpg");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
}
.slide4 {
background: url("images/space/gallexy3.jpg");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
z-index: 10;
}
.container h2 {
position: fixed;
transform: translate(50%, 50%);
z-index: 9;
color: white;
font-size: 3em;
top: 40%;
left: 10%;
}
</style>
</head>
<body>
<div class="container">
<h2>Lorem ipsum dolor sit amet.</h2>
<div class="slide1 slides">
</div>
<div class="slide2 slides">
<!-- <h2>Lorem ipsum dolor sit amet.</h2> -->
</div>
<div class="slide3 slides">
<!-- <h2>Lorem ipsum dolor sit amet.</h2> -->
</div>
<div class="slide4 slides">
<h3>Lorem ipsum dolor sit amet.</h3>
</div>
</div>
</body>
</html>