-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnik.css
More file actions
78 lines (68 loc) · 2.23 KB
/
nik.css
File metadata and controls
78 lines (68 loc) · 2.23 KB
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
/* Tiny reset thingy */
body,html{margin:0;padding:0;}
.wrapper {
/* The height needs to be set to a fixed value for the effect to work.
* 100vh is the full height of the viewport. */
height: 100vh;
/* The scaling of the images would add a horizontal scrollbar, so disable x overflow. */
overflow-x: hidden;
/* Enable scrolling on the page. */
overflow-y: auto;
/* Set the perspective to 2px. This is essentailly the simulated distance from the viewport to transformed objects.*/
perspective: 2px;
}
.section {
font-family: 'Rock Salt', cursive;
font-size: 250%;
/* Needed for children to be absolutely positioned relative to the parent. */
position: relative;
/* The height of the container. Must be set, but it doesn't really matter what the value is. */
height: 100vh;
/* For text formatting. */
display: flex;
align-items: center;
justify-content: center;
color: white;
text-shadow: 0 0 0.5px #000;
}
.parallax::after {
/* Display and position the pseudo-element */
content: " ";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* Move the pseudo-element back away from the camera,
* then scale it back up to fill the viewport.
* Because the pseudo-element is further away, it appears to move more slowly, like in real life. */
transform: translateZ(-1px) scale(1.5);
/* Force the background image to fill the whole element. */
background-size: 100%;
/* Keep the image from overlapping sibling elements. */
z-index: -1;
}
/* The styling for the static div. */
.page {
position: relative;
/* The height of the container. Must be set, but it doesn't really matter what the value is. */
height: 120vh;
/* For text formatting. */
display: flex;
align-items: center;
justify-content: center;
color: white;
text-shadow: 0 s 1px #000;
font-family: 'Rock Salt', cursive;
font-size: 150%;
background-image: url('green.jpg');
}
/* Sets the actual background images to adorable kitties. This part is crucial. */
.bg1::after {
font-family: 'Rock Salt', cursive;
background-image: url('red.jpg');
}
.bg2::after {
font-family: 'Rock Salt', cursive;
background-image: url('blue.jpg');
}