-
Notifications
You must be signed in to change notification settings - Fork 3
/
hexwall.css
76 lines (66 loc) · 1.62 KB
/
hexwall.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
.hex-container {
display: flex;
justify-content: space-between;
max-width: 80%;
width: calc(115px * 10); /* Assuming 6 hexagons per row, adjust as needed */
margin-left: 100px;
margin-top: 100px;
}
/* Optional: Add a hover effect to scale images up slightly */
/* .hex-container img:hover {*/
/* transform: scale(1.05);*/
/* }*/
.hex {
width: 12%; /* Adjust based on your image size */
padding-bottom: 20%; /* This makes the div height relative to its width */
position: relative;
margin-top: -12%; /* Adjust for tessellation */
margin-right: 0;
margin-left: -70px;
}
.hex:nth-child(odd) {
margin-right: 0;
}
/* Adjust the margin-top for every 6th hexagon to create a new row */
.hex:nth-child(even) {
margin-top: 0;
}
.hex img {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.description {
visibility: hidden;
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
padding: 10px;
border-radius: 5px;
text-align: center;
z-index: 2;
display: inline-block;
}
.hex:hover .description {
visibility: visible;
}
.hex:nth-child(odd):hover .description {
bottom: 100%;
}
.hex:nth-child(even):hover .description {
top: 60%;
}
.gradient-rectangle {
height: 40px; /* Adjust as needed */
background: linear-gradient(to right, #fff2cc, #ffe6cc, #f8cecc);
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px; /* Add some padding to space out the text from the edges */
}
.task {
color: black; /* Text color */
font-weight: bold;
}