-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject.css
116 lines (101 loc) · 2.07 KB
/
Project.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
body {
margin: 40px 0;
font-family: Arial, sans-serif;
font-size: 14px;
font-weight: 500;
background-color: #BCAAA4;
-webkit-font-smoothing: antialiased;
}
.title {
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
color: #5D4037;
text-align: center;
}
p {
line-height: 1.5em;
}
h1+p, p+p {
margin-top: 10px;
}
.container {
padding: 40px 80px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.card {
margin: 10px;
transform: perspective(800px);
transform-style: preserve-3d;
cursor: pointer;
width: 280px;
height: 260px;
overflow: hidden;
border-radius: 10px;
box-shadow:
rgba(black, 0.66) 0 30px 60px 0,
inset #333 0 0 0 5px,
inset rgba(white, 0.5) 0 0 0 6px;
transition: 0.5s cubic-bezier(0.445, 0.05, 0.55, 0.95); /* reduced duration from 1s to 0.5s */
display: flex;
position: relative;
background-color: #fff;
}
.card.left {
flex-direction: row;
}
.card.right {
flex-direction: row-reverse;
}
.card img {
width: 360px;
height: 240px;
object-fit: cover;
border-radius: 10px;
}
.card .text {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #000;
text-shadow: rgba(black, 0.5) 0 10px 10px;
opacity: 0;
transition: opacity 0.3s ease-in-out;
}
.card:hover .text {
opacity: 1;
}
.card .text h1 {
font-family: "Playfair Display";
font-size: 36px;
font-weight: 700;
text-shadow: rgba(black, 0.5) 0 10px 10px;
}
.card .text p {
opacity: 0;
text-shadow: rgba(black, 1) 0 2px 3px;
transition: 0.3s 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); /* reduced delay from 1.6s to 0.3s */
}
.card:hover .text h1 {
transform: translateY(0);
}
.card:hover .text p {
opacity: 1;
transition: 0.3s 0s cubic-bezier(0.215, 0.61, 0.355, 1); /* removed delay */
}
.card:hover {
box-shadow:
rgba(white, 0.2) 0 0 40px 5px,
rgba(white, 1) 0 0 0 1px,
rgba(black, 0.66) 0 30px 60px 0,
inset #333 0 0 0 5px,
inset white 0 0 0 6px;
}