-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
91 lines (86 loc) · 1.71 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
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap');
*{
box-sizing: border-box;
margin:0;
padding:0;
font-family: 'Poppins', sans-serif;
}
h1{
top:0;
text-align: center;
}
body{
background: #DCDCDC;
}
section{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
flex-wrap: wrap;
transform-style: preserve-3d;
}
section .card{
position: relative;
width: 320px;
height: 320px;
margin: 20px;
transform-style: preserve-3d;
perspective: 1000px;
}
section .card .box{
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
transform-style:preserve-3d ;
transition: 1s ease;
}
section .card:hover .box{
transform: rotateY(180deg);
}
section .card .box .imgBx{
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
}
section .card .box .imgBx img{
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
object-fit: cover;
}
section .card .box .contentBx{
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
background: #333;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
transform-style: preserve-3d;
transform: rotateY(180deg);
}
section .card .box .contentBx div{
transform-style: preserve-3d;
padding: 20px;
background: linear-gradient(45deg,#f30061,#ffeb3b);
transform: translateZ(240px);
}
section .card .box .contentBx div h2{
color:#fff;
font-size: 20px;
letter-spacing: 1px;
}
section .card .box .contentBx div p{
color: #fff;
font-size: 16px;
}