-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
76 lines (64 loc) · 1.49 KB
/
styles.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
.book_div_container {
display: flex;
flex-wrap: wrap;
}
.new_line {
flex-basis: 100%;
}
.book_div {
position: relative; /* Ensure the text overlay stays within the book div */
height: 300px;
width: 200px;
margin: 15px;
overflow: hidden;
}
.book_cover {
height: 100%;
width: 100%;
transition: filter 0.3s ease, transform 0.3s ease; /* Smooth transition */
}
.book_div:hover .book_cover {
filter: brightness(50%); /* Darkens the image */
transform: scale(1.1); /* Slightly zooms in the image */
}
.overlay-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #4f4f4f;
font-size: 30px;
text-align: center;
opacity: 0; /* Hidden by default */
transition: opacity 0.3s ease, color 0.5s ease;
pointer-events: none; /* Ensures the text doesn't interfere with the hover */
}
.overlay-button {
position: absolute;
top: 80%;
left: 60%;
display: none;
/*transform: translate(%, -50%);*/
}
#overlay-magnet-button {
position: absolute;
padding:5px;
transform:translate(-180%,0%);
}
#overlay-direct-button {
position:absolute;
padding: 5px;
transform: translate(-10%,0)
}
.book_div:hover .overlay-text {
opacity: 1; /* Shows text on hover */
z-index: 2;
color: white;
}
.book_div:hover .overlay-button {
display:block;
z-index: 2;
}
p {
color: blue;
}