-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
80 lines (65 loc) · 1.24 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
:root{
--backgroud: #F8F8FF;
--text: #2c2c2c;
}
html{
scroll-behavior: smooth;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
font-size: 16px;
font-family: Popins,sans-serif;
height: 100vh;
padding: 6rem 2rem;
background: var(--backgroud);
}
.articles{
display: flex;
flex-wrap: wrap;
margin: 0 auto;
justify-content: center;
max-width: 1200px;
gap: 1.5rem;
}
.articles article{
max-width: 20rem;
width: 100%;
cursor: pointer;
position: relative;
display: block;
transition: all 0.4s ease-in-out;
overflow: hidden;
border-radius: 1rem;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}
.articles article h2{
margin: 0 0 0.5rem 0;
font-size: 1.6rem;
color: var(--text);
transition: color 0.3s ease-out;
}
.articles article img{
max-width: 100%;
transform-origin: center;
transition: transform 0.4s ease-in-out;
height: 100%;
aspect-ratio: 16/9;
overflow: hidden;
object-fit: cover;
}
.articles article:hover img{
transform: scale(1.5);
}
.article-preview{
padding: 1.5rem;
background: white;
}
.articles figure{
width: 100%;
height: 14rem;
overflow: hidden;
}