-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
61 lines (54 loc) · 1.41 KB
/
style.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
*{
margin:0;
padding:0;
box-sizing: border-box;
}
body{
width: 100%;
height: 100%;
background-color: #555;
}
section{
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.container{
position: relative;
height: 450px;
width: 800px;
background-color: #222;
}
.clip{
position: absolute;
width: 100%;
height: 100%;
top:0;
right: 0;
transition: all 0.5s;
}
.clip1{
background-image: url(https://images.unsplash.com/photo-1546518086-03ef264c9885?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
background-position: center;
background-size: cover;
clip-path: polygon(0 0, 35% 0, 15% 100%, 0 100%);
}
.clip2{
background-image: url(https://images.unsplash.com/photo-1525609004556-c46c7d6cf023?q=80&w=1937&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
background-position: center;
background-size: cover;
clip-path: polygon(35% 0, 65% 0, 85% 100%, 15% 100%);
}
.clip3{
background-image: url(c3.png);
background-position:center;
background-size: cover;
clip-path: polygon(65% 0, 100% 0, 100% 100%, 85% 100%);
}
.container:hover .clip{
clip-path: polygon(100% 0, 100% 0,100% 100%,100% 100%);
}
.container .clip:hover{
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}