-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard.css
139 lines (118 loc) · 2.39 KB
/
card.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
138
139
/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");
/*===== VARIABLES CSS =====*/
:root {
/*===== Colores =====*/
--first-color: #F2A20C;
--white-color: #E9EAEC;
--dark-color: #272D40;
--dark-color-lighten: #F2F5FF;
/*===== Fuente y tipografia =====*/
--body-font: 'Poppins', sans-serif;
--h1-font-size: 1.5rem;
--h2-font-size: 1.25rem;
--normal-font-size: 1rem;
--small-font-size: .875rem;
}
/*===== BASE =====*/
*, ::before, ::after {
box-sizing: border-box;
}
#about {
margin: 0;
padding: 0;
font-family: var(--body-font);
font-size: var(--normal-font-size);
text-align: center;
}
#about h1, p,h2 {
margin: 0;
}
#about a {
text-decoration: none;
}
#about img {
max-width: 100%;
height: auto;
}
/*===== CARD =====*/
.card-con {
text-align: left;
height: fit-content;
display: inline-block;
justify-content: center;
align-items: center;
margin-top: 5%;
margin-left: 0%;
}
.card {
width: 320px;
height: 400px;
background-color: var(--dark-color);
border-radius: 1rem;
padding: 4rem 2rem 0;
color: var(--white-color);
overflow-y: hidden;
}
.card__img {
position: absolute;
width: 260px;
filter: drop-shadow(5px 10px 15px rgba(8,9,13,.4));
}
.card__data {
transform: translateY(27.2rem);
text-align: center;
}
.card__title {
font-size: var(--h1-font-size);
color: var(--first-color);
margin-bottom: 1rem;
}
.card__preci {
display: inline-block;
font-size: var(--h2-font-size);
font-weight: 500;
margin-bottom: 1.25rem;
}
.card__description {
font-size: var(--normal-font-size);
text-align: initial;
margin-bottom: 1.25rem;
opacity: 0;
}
.card__button:hover {
box-shadow: 0 18px 40px -12px rgba(242,162,12,.35);
}
.card__img,
.card__data,
.card__title,
.card__preci,
.card__description {
transition: .5s;
}
#about p{
color: var(--white-color);
}
/* Hover card effect */
.card:hover .card__img {
transform: translate(-1.5rem, -9.5rem) rotate(-20deg);
}
.card:hover .card__data {
transform: translateY(20.8rem);
text-align: right;
}
.card:hover .card__title {
transform: translateX(-2.5rem);
margin-bottom: 0;
}
.card:hover .card__preci {
transform: translateX(-2.8rem);
color: var(--white-color);
text-align: center;
opacity: 1;
}
.card:hover .card__description,
.card:hover .card__button {
transition-delay: .2s;
opacity: 1;
}