-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.css
137 lines (119 loc) · 2.22 KB
/
index.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/* 这是引入了一些字体 */
@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(45deg, #fbda61, #ff5acd);
}
.card {
position: relative;
width: 350px;
height: 190px;
/* height: 450px; */
background: #fff;
border-radius: 20px;
box-shadow: 0 35px 80px rgba(0, 0, 0, 0.15);
transition: 0.5s;
}
.card:hover {
height: 450px;
}
.imgBx {
position: absolute;
left: 50%;
top: -50px;
transform: translateX(-50%);
width: 150px;
height: 150px;
background: #fff;
border-radius: 20px;
box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
overflow: hidden;
transition: 0.5s;
}
.card:hover .imgBx {
width: 250px;
height: 250px;
}
.imgBx img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.card .content {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: flex-end;
overflow: hidden;
}
.card .content .details {
padding: 40px;
text-align: center;
width: 100%;
transition: 0.5s;
transform: translateY(150px);
}
.card:hover .content .details {
transform: translateY(0px);
}
.card .content .details h2 {
font-size: 1.25em;
font-weight: 600;
color: #555;
line-height: 1.2em;
}
.card .content .details h2 span {
font-size: 0.75em;
font-weight: 500;
opacity: 0.5;
}
.card .content .details .data {
display: flex;
justify-content: space-between;
margin: 20px 0;
}
.card .content .details .data h3 {
font-size: 1em;
color: #555;
line-height: 1.2em;
font-weight: 600;
}
.card .content .details .data h3 span {
font-size: 0.85em;
font-weight: 400;
opacity: 0.5;
}
.card .content .details .actionBtn {
display: flex;
justify-content: space-between;
}
.card .content .details .actionBtn button {
padding: 10px 30px;
border-radius: 5px;
border: none;
outline: none;
font-size: 1em;
font-weight: 500;
background: #ff5f95;
color: #fff;
cursor: pointer;
}
.card .content .details .actionBtn button:nth-child(2) {
border: 1px solid #999;
color: #999;
background: #fff;
}