-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstyle.css
More file actions
69 lines (57 loc) · 1.94 KB
/
style.css
File metadata and controls
69 lines (57 loc) · 1.94 KB
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height: 100vh;
/*css background color palette*/
/*https://coolors.co/gradient-palette/2b0948-ce653b?number=7*/
background: hsla(272, 78%, 16%, 1);
background: linear-gradient(90deg, hsla(272, 78%, 16%, 1) 0%, hsla(17, 60%, 52%, 1) 100%);
background: -moz-linear-gradient(90deg, hsla(272, 78%, 16%, 1) 0%, hsla(17, 60%, 52%, 1) 100%);
background: -webkit-linear-gradient(90deg, hsla(272, 78%, 16%, 1) 0%, hsla(17, 60%, 52%, 1) 100%);
filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#2b0948", endColorstr="#ce653b", GradientType=1 ); /* Chrome 10-25, Safari 5.1 -6 */
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
section{
display: grid;
grid-template-columns: repeat(4, 8rem);
grid-template-rows: repeat(4, 8rem);
grid-gap: 2rem;
perspective: 800px;
}
.card{
position: relative;
/* this transform property animates to 3d and rotates*/
transform-style: preserve-3d;
transition: all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
box-shadow: rgba(0,0,0,0.2) 0px 5px 15px;
}
.face,
.back{
width: 100%;
height: 100%;
position: absolute;
/*pointer-events of none allows to grab card instead of element*/
pointer-events: none;
}
.back{
background: hsla(155, 23%, 71%, 1);
background: linear-gradient(90deg, hsla(155, 23%, 71%, 1) 0%, hsla(302, 17%, 32%, 1) 100%);
background: -moz-linear-gradient(90deg, hsla(155, 23%, 71%, 1) 0%, hsla(302, 17%, 32%, 1) 100%);
background: -webkit-linear-gradient(90deg, hsla(155, 23%, 71%, 1) 0%, hsla(302, 17%, 32%, 1) 100%);
filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#a4c6b8", endColorstr="#5e435d", GradientType=1 );
/*This allows card to be shown when it rotates*/
backface-visibility: hidden;
}
.toggleCard{
transform: rotateY(180deg);
}
/*reverses image to flip correctly*/
.face{
transform: rotateY(-180deg);
}