-
Notifications
You must be signed in to change notification settings - Fork 42
/
blurry-effect.html
56 lines (47 loc) · 1.44 KB
/
blurry-effect.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blur Effect</title>
<style>
body {
text-align: center;
}
.depth-gallery {
position: relative;
display: inline-block;
padding: 20px;
padding-top: 0;
padding-bottom: 0;
}
.depth-gallery img {
border: 7px solid white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
cursor: crosshair;
transition: filter 0.3s linear, transform 0.3s linear;
margin: 8px;
}
.depth-gallery:hover img {
filter: blur(4px);
transform: scale(0.9);
}
.depth-gallery img:hover{
filter: blur(0px);
transform: scale(1.1);
}
</style>
</head>
<body>
<p>
Hover over images to see the magic ✨
</p>
<div class="depth-gallery">
<img src="https://bit.ly/3mYYSNU" alt="a smiling dog" height="300">
<img src="https://bit.ly/3tMBSpd" alt="library" height="300"> <br>
<img src="https://bit.ly/3N6DBMS" alt="Hogwarts ties" height="300">
<img src="https://bit.ly/3OnTX4N" alt="Chocolates" height="300">
</div>
</body>
</html>