-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
59 lines (52 loc) · 1.02 KB
/
styles.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
/*
Following site was used as reference for flipping animation. I modify class names and attributes to
get flip animation to work correctly and on event click.
http://desandro.github.io/3dtransforms/docs/card-flip.html
*/
.gamebackground {
margin-top: 200px;
margin-bottom: 200px;
margin-right: 30%;
margin-left: 30%;
border-style: dashed;
border-width: 1px
}
.row {
display: flex;
}
.container {
position: relative;
perspective: 800px;
margin: auto;
margin-top: 15px;
margin-bottom: 15px;
height: 80px;
width: 18%;
border-style: solid;
border-width: 1px;
}
.card {
width: 100%;
height: 100%;
position: absolute;
transform-style: preserve-3d;
transition: transform 1s;
}
.card div {
margin: 0;
display: block;
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
}
.card .fronts {
background: red;
}
.card .backs {
background: blue;
transform: rotateY( 180deg );
}
.card.flipped {
transform: rotateY( 180deg );
}