-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImage-Effect.css
More file actions
45 lines (40 loc) · 781 Bytes
/
Image-Effect.css
File metadata and controls
45 lines (40 loc) · 781 Bytes
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
#Image-Effect{
margin: 0;
padding: 0;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.imgBx{
position: relative;
width: 550px;
height: 450px;
overflow: hidden;
}
.imgBx img{
position: absolute;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
background-size: cover;
transition: 0.8s;
pointer-events: none;
}
.imgBx:hover img:nth-child(2){
opacity: 0;
filter: blur(10px);
transform: translateX(-50%) scaleX(2);
}
.imgBx img:nth-child(1){
opacity: 0;
filter: blur(10px);
transform: translateX(50%) scaleX(2);
}
.imgBx:hover img:nth-child(1){
opacity: 1;
filter: blur(0px);
transform: translateX(0) scaleX(1);
}