-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
72 lines (63 loc) · 1.4 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
60
61
62
63
64
65
66
67
68
69
70
71
72
*{
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body{
font-family: arial ,sans-serif;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 100vh;
}
img {
max-width: 100%;
}
.card {
position: relative;
width: 375px;
margin: 30px auto;
overflow: hidden;
}
.card , .card:hover.card-container {
cursor: pointer;
}
.card__img {
display:block;
}
.card:hover .card-container {
-webkit-transform: translate(0 , 0) ;
transform: translate(0 , 0) ;
}
.card-container {
position: absolute;
top: 0;
left: 0;
height: 100%;
padding: 100px 20px ;
color: #fff;
background-color:rgba(228, 30, 30, 0.438) ;
-webkit-transform: translate(100% , 100%) rotate(-360deg) ;
transform: translate(100% , 100%) rotate(-360deg) ;
-webkit-transition: -webkit-transform 1s;
transition: -webkit-transform 1s;
transition: transform 1s;
transition: transform 1s, -webkit-transform 1s;
}
.card__title {
text-align: center;
padding-bottom: 8px;
border-bottom: 4px solid;
font-size: 2rem;
}
.card__paragraph {
margin-top: 30px;
line-height: 1.5;
}