-
Notifications
You must be signed in to change notification settings - Fork 0
/
stye.css
94 lines (76 loc) · 1.49 KB
/
stye.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
92
93
94
.project-card {
border: 2px solid green;
width: 400px;
height: 400px;
margin: 10px auto;
overflow: hidden;
background: url('../assets/harmonic-image.png') no-repeat fixed;
background-size: contain;
position: relative;
}
.card-content {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
}
.card-body {
width: 100%;
height: 100%;
/* background: white; */
}
.card-diagonal-one,
.card-diagonal-two {
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
}
.card-diagonal-one {
background: red;
transform: skewY(40deg) translateY(400px);
}
.card-diagonal-two {
background: green;
transform: skewY(40deg) translateY(-400px);
}
.project-card:hover .card-diagonal-one {
/* transform: skewY(40deg) translateY(200px) */
animation: cover-one 2s ease-in alternate-reverse;
}
.project-card:hover .card-diagonal-two {
/* transform: skewY(40deg) translateY(-200px); */
animation: cover-two 2s ease-in alternate-reverse;
}
@keyframes cover-one {
from {
transform: skewY(40deg) translateY(400px);
}
to {
transform: skewY(40deg) translateY(200px)
}
}
@keyframes cover-two {
from {
transform: skewY(40deg) translateY(-400px);
}
to {
transform: skewY(40deg) translateY(-200px)
}
}
.card-image,
.card-texts {
width: 100%;
height: 100%;
position: absolute;
}
.card-image {
background-color: blue;
z-index: 1;
}
.card-texts {
color: white;
}
.project-card:hover .card-image {
z-index: -1;
/* opacity: 0; */
}