-
Notifications
You must be signed in to change notification settings - Fork 0
/
packimgstyleold.css
75 lines (73 loc) · 1.32 KB
/
packimgstyleold.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container3 {
position: relative;
width: 1000px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.container3 .card {
position: relative;
display: flex;
flex-direction: column;
background: #fff;
}
.container3 .card:nth-child(even) {
flex-direction: column-reverse;
}
.container3 .card .imgbx{
position: relative;
width: 250px;
height: 250px;
background: #000;
}
.container3 .card .imgbx img{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.container3 .card .content{
position: relative;
width: 100px;
height: 100px;
display: flex;
align-items: center;
}
.container3 .card .content div{
padding: 20px;
text-align: center;
}
@media (max-width: 1000px) {
.container3 {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
margin: 50px;
}
.container3 .card{
flex-direction: row;
margin: 10px 0;
}
.container3 .card:nth-child(even) {
flex-direction: row-reverse;
}
.container3 .card .imgbx,
.container3 .card .content: {
width: 50%
}
}
@media (max-width: 600px) {
.container3 .card{
flex-direction: column;
margin: 10px 0;
}