forked from codrops/SVGImageHover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
73 lines (73 loc) · 3.78 KB
/
index2.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Distortion Effects with SVG Filters | Demo 2 | Codrops</title>
<meta name="description" content="Some distortion hover effects on images using SVG filters." />
<meta name="keywords" content="distortion, svg filter, hover, image, effect, web, javascript" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Antic+Didone|Nunito+Sans" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
</head>
<body class="demo-2">
<main>
<div class="message">You need to be able to hover to see the effect.</div>
<div class="frame">
<div class="frame__title-wrap">
<h1 class="frame__title">Image Distortion Effects with SVG Filters</h1>
<div class="frame__links">
<a href="https://tympanus.net/Development/TextTrailEffect/">Previous Demo</a>
<a href="https://tympanus.net/codrops/?p=38971">Article</a>
<a href="https://github.com/codrops/SVGImageHover/">GitHub</a>
</div>
</div>
<div class="frame__demos">
<a href="index.html" class="frame__demo">Effect 1</a>
<a href="index2.html" class="frame__demo frame__demo--current">Effect 2</a>
<a href="index3.html" class="frame__demo">Effect 3</a>
</div>
<div class="frame__credits">
<h4 class="frame__heading">Designer</h4>
<span class="frame__text">Ayita Winter</span>
<h4 class="frame__heading">Art Direction</h4>
<span class="frame__text">Karl S. Greenberg</span>
<h4 class="frame__heading">Developer</h4>
<span class="frame__text">Francine O'Connor</span>
</div>
<div class="frame__contact">
<h4 class="frame__heading">Contact</h4>
<span class="frame__text">[email protected]</span>
<span class="frame__text">+66808099456</span>
</div>
<div class="frame__photography">Photography by Joaquin Camillo</div>
</div>
</div>
<div class="content">
<svg class="distort" width="350" height="450" viewBox="0 0 350 450">
<filter id="distortionFilter">
<feTurbulence type="fractalNoise" baseFrequency="0.01 0.003" numOctaves="5" seed="2" stitchTiles="noStitch" x="0%" y="0%" width="100%" height="100%" result="noise"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="0" xChannelSelector="R" yChannelSelector="B" x="0%" y="0%" width="100%" height="100%" filterUnits="userSpaceOnUse"/>
</filter>
<g filter="url(#distortionFilter)">
<image class="distort__img" x="50" y="50" xlink:href="img/5.jpg" height="350" width="250"/>
<image class="distort__img" x="50" y="50" xlink:href="img/6.jpg" height="350" width="250"/>
<image class="distort__img" x="50" y="50" xlink:href="img/7.jpg" height="350" width="250"/>
<image class="distort__img" x="50" y="50" xlink:href="img/8.jpg" height="350" width="250"/>
</g>
</svg>
<nav class="menu">
<a href="#" class="menu__link">Moscow</a>
<a href="#" class="menu__link">Stockholm</a>
<a href="#" class="menu__link">Istanbul</a>
<a href="#" class="menu__link">Budapest</a>
</nav>
</div>
</main>
<script src="js/charming.min.js"></script>
<script src="js/TweenMax.min.js"></script>
<script src="js/demo2.js"></script>
</body>
</html>