-
Notifications
You must be signed in to change notification settings - Fork 6
/
v6.css
69 lines (54 loc) · 1.44 KB
/
v6.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
/* Non relevant styles - comments werent like this in codepen // */
* {
box-sizing: border-box;
}
body {
background-image: url("pattern_background.png");
background-repeat: repeat; /* -y repeat-x;*/
}
p {
font-size: 20px;
font-family: sans-serif;
color: white;
}
.container {
padding: 100px 30px;
width: 100%;
margin: 0 auto;
max-width: 900px;
}
.header{
display:grid;
grid-template-columns: 50% 50%;
}
.intro{
display:grid;
grid-template-columns: 40% 60%;
}
/* Relevant styles*/
.image-stack {
display: grid;
position: relative; /* imperative for the overlapping to work*/
grid-template-columns: repeat(12, 1fr); /*12 columns - 1 fractional unit each*/
}
.image-stack__item--bottom {
grid-column: span 12 / -1;/*4 / -1;*/ /*starts at span4 and continues to the end (-1 enables that)*/
grid-row: 1;
z-index: 0;
}
.image-stack__item--top {
grid-row: 1; /*the images are on teh same row*/
grid-column: 1 / span 12; /*1 / span 8;*/ /*starts at beginning goes up to col. 8*/
padding-top: 81%; /*slightly arbitrary keeps proportion once resized*/
z-index: -1;
}
.image-stack__item--top-2 {
grid-row: 1; /*the images are on teh same row*/
grid-column: 1 / span 12; /*1 / span 8;*/ /*starts at beginning goes up to col. 8*/
padding-top: 81%; /*slightly arbitrary keeps proportion once resized*/
z-index: 1; /* tells the browser to make this image on top*/
}
img {
display: block;
width: 100%;
}