1+ @import url ('http://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap' );
2+
3+
4+ * {
5+ margin : 0 ;
6+ padding : 0 ;
7+ box-sizing : border-box;
8+ font-family : 'Roboto' , sans-serif;
9+ }
10+
11+ body {
12+ display : flex;
13+ flex-direction : column;
14+ justify-content : center;
15+ align-items : center;
16+ min-height : 100vh ;
17+ background : # FFE11D ;
18+ overflow : hidden;
19+ }
20+ .top {
21+ display : flex;
22+ flex-direction : column;
23+ justify-content : center;
24+ align-items : center;
25+ }
26+ .top h1 {
27+ font-size : 2.5em ;
28+ color : # fff ;
29+ padding-bottom : 10px ;
30+ text-transform : uppercase;
31+ text-shadow : 4px 4px 4px rgba (0 , 0 , 0 , 0.4 );
32+ }
33+ .top img {
34+
35+ width : 100px ;
36+ height : 100px ;
37+ object-fit : contain;
38+ }
39+
40+ .card {
41+ position : relative;
42+ width : 300px ;
43+ height : 400px ;
44+ background : # fff ;
45+ transform-style : preserve-3d;
46+ transform : perspective (1000px );
47+ box-shadow : 10px 20px 40px rgba (0 , 0 , 0 , 0.4 );
48+ transition : 1.5s ;
49+ }
50+
51+ .card : hover {
52+ transform : translateX (50% );
53+ }
54+
55+ .card .imgBox {
56+
57+ position : relative;
58+ height : 400px ;
59+ width : 300px ;
60+ z-index : 1 ;
61+ transform-origin : left;
62+ transform-style : preserve-3d;
63+ background-color : # 000 ;
64+ transition : 1.5s ;
65+ }
66+
67+ .card : hover .imgBox {
68+ transform : rotateY (-180deg );
69+ }
70+
71+ .card .imgBox img {
72+ position : absolute;
73+ top : 0 ;
74+ left : 0 ;
75+ width : 100% ;
76+ height : 100% ;
77+ transform-style : preserve-3d;
78+ object-fit : cover;
79+ backface-visibility : hidden;
80+ }
81+
82+ .card .imgBox img : nth-child (2 ){
83+ transform : rotateY (180deg );
84+
85+ }
86+ .card .details {
87+ position : absolute;
88+ top : 0 ;
89+ left : 0 ;
90+ width : 100% ;
91+ height : 100% ;
92+ padding : 20px ;
93+ display : flex;
94+ justify-content : center;
95+ align-items : center;
96+ }
97+
98+ .card .details .content {
99+ display : flex;
100+ justify-content : center;
101+ align-items : center;
102+ flex-direction : column;
103+
104+ }
105+
106+ .card .details .content h2 {
107+ text-align : center;
108+ font-weight : 700 ;
109+ line-height : 1em ;
110+ }
111+ .card .details .content h2 span {
112+ color : rgb (0 , 183 , 255 );
113+ font-size : 0.8em ;
114+ }
115+
116+ .card .details .content .social-icons {
117+ position : relative;
118+ display : flex;
119+ margin-top : 10px ;
120+ }
121+ .card .details .content .social-icons a {
122+ display : inline-block;
123+ width : 35px ;
124+ height : 35px ;
125+ background : # 333 ;
126+ color : # fff ;
127+ display : flex;
128+ justify-content : center;
129+ align-items : center;
130+ text-decoration : none;
131+ margin : 5px ;
132+ font-size : 18px ;
133+ transition : 0.2s ;
134+
135+ }
136+ .card .details .content .social-icons a : hover {
137+ background : rgb (0 , 183 , 255 );
138+ }
0 commit comments