-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
177 lines (172 loc) · 3.81 KB
/
style.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/* Setting the font-family to the font I want to use. */
*,*:before,*:after{
margin:0;
padding: 0;
box-sizing: border-box;
}
html{
font-size: 62.5%;
}
:root{
--color-naranja-primary: #f12711;
--color-naranja-secondary: #f5af19;
--color-verde-primary: #1d8d36;
--color-verde-secondary: #8ef519;
--color-azul-primary: #09077c;
--color-azul-secondary: #00b4db;
}
body{
font-family: 'Press Start 2P', cursive;
}
/*s
---CARD---
*/
/* The CSS code for the card. */
.background{
background-image: url("https://i.pinimg.com/originals/ca/e0/1a/cae01ab5cce960db0d7819cc96e97ce8.png");
background-size: cover;
background-position: bottom;
}
.card.container{
display: flex;
justify-content:center;
justify-items: center;
align-items: center;
padding: 4rem;
width: 100%;
min-width:100%;
height:100vh;
}
.card{
height: 90vh;
width: 40rem;
left: 480px;
min-width:35rem;
box-shadow: 0 1.5rem 4rem rgba(0,0,0, 0.6);
margin:2rem;
display: flex;
flex-direction:column;
align-items: center;
justify-content:center;
border-radius:0.8rem;
position: relative;
background-color: #fff;
z-index:10;
}
.card-image{
width: 100%;
height: auto;
display: flex;
flex-direction:column;
align-items: center;
justify-content: center;
margin-top: -10rem;
}
.card-image img{
width: 25rem;
height: auto;
object-fit: cover;
transition: all 0.3s ease;
backface-visibility: hidden;
margin-bottom: 2rem;
}
/*
---TEXTO---
*/
/* Just styling the elements. */
.card-text{
font-size: 1.5rem;
text-align: center;
position: absolute;
top: 50%;
transform: translateY(-50%);
margin-top: 14rem;
}
.date{
font-weight: 700;
}
.card-text h2{
font-size: 2.2rem;
font-weight: 300;
}
.card-text h2 i{
font-size: 3rem;
margin: 1rem;
}
.card-text p{
padding: 0 2rem;
}
.fas.fa-fire, .date-1{
color: var(--color-naranja-primary)
}
.fas.fa-leaf, .date-2{
color: var(--color-verde-primary)
}
.fas.fa-tint, .date-3{
color: var(--color-azul-primary)
}
/*
--PIE--
*/
.card-stats{
display: flex;
justify-content: space-between;
align-items: flex-end;
width: 100%;
padding: 10px;
font-size: 1.3rem;
color: black;
font-weight: 700;
border-bottom-left-radius: 0.8rem;
border-bottom-right-radius: 0.8rem;
position: absolute;
bottom: 0;
}
.card-1{
background-image: linear-gradient(to right,
var(--color-naranja-primary), var(--color-naranja-secondary));
}
.card-2{
background-image: linear-gradient(to right,
var(--color-verde-primary), var(--color-verde-secondary));
}
.card-3{
background-image: linear-gradient(to right,
var(--color-azul-primary), var(--color-azul-secondary));
}
.stat{
display:flex;
flex-direction:column;
justify-content:center;
align-items: center;
}
.stat:not(:last-of-type):after{
content: "";
background-color: rgba(255,255,255,0.3);
width: 0.2rem;
height: 100%;
position: absolute;
margin-left: 10em;
}
/*
--HOVER--
*/
/* This is the hover effect for the card. When you hover over the card, the image will rotate -15
degrees,
the width will be 30rem, the margin-top will be -6.2rem, the position will be relative, the z-index
will be 50,
and the transform will be rotate(-15deg). */
.card:hover .card-image img{
width: 30rem;
margin-top: -6.2rem;
position: relative;
z-index:50;
transform: rotate(-15deg);
}
/* A media query that is saying if the screen is at least 1800px wide, then the card will be 780px from
the left. */
@media (min-width: 1800px){
.card{
left: 780px;
}
}