-
Notifications
You must be signed in to change notification settings - Fork 6
/
layout.css
99 lines (81 loc) · 1.54 KB
/
layout.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
body {
color: white;
font-family: "Lucida Console", Monaco, monospace;
background: linear-gradient(to left, #606c88 , #3f4c6b);
}
a, a:visited {
color: inherit;
text-decoration: none;
}
h1, h2, h3 {
text-align: center;
font-weight: 400;
}
.demo {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
section {
margin: 20px;
border: 10px solid #9E9E9E;
border-radius: 10px;
}
section:not(.vertical) {
width: var(--width);
}
section header,
section footer {
height: var(--height);
}
section.vertical {
position: relative;
display: flex;
height: var(--height);
width: calc(var(--width) * 3);
}
section.vertical header,
section.vertical footer {
height: 100%;
width: var(--width);
}
section header {
background: var(--top-color);
}
section footer {
background: var(--bottom-color);
}
.image.above section header,
.image.below section footer {
height: calc(var(--height) * 2);
background-image: url(image.jpg);
background-size: cover;
background-position: bottom;
}
.image.above section.vertical header,
.image.below section.vertical footer {
height: 100%;
width: calc(var(--width) * 2);
background-position: bottom right;
}
.image section {
position: relative;
}
.image .separator {
position: absolute;
}
.image.above .separator {
--top-color: transparent;
margin-top: calc(var(--height) * -1);
}
.image.below .separator {
--bottom-color: transparent;
}
.image .vertical .separator {
margin-top: 0;
margin-left: var(--width);
}
.vertical {
--height: 300px;
--width: 100px;
}