Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
blob: 35a3030e8e127f19e35d99840612576ad4ffc3f2 (plain)
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>JavaScript/CSS Pan & Zoom Demo</title>
    <link rel="stylesheet" href="assets/css/style.css">
  </head>
  <body>
    <h1>Pan & Zoom an Element with CSS/JavaScript</h1>

    <p>
      Click and drag on the image to pan. Use the mouse wheel
      to zoom in and out.
    </p>

    <p>
      <button>
        <span class="button-text svg">Raster image</span>
        <span class="button-text raster">SVG image</span>
      </button>
    </p>

    <div class="container">
      <object type="image/svg+xml" data="assets/images/image.svg"></object>
      <img src="assets/images/41156165560-4438592e93-o.webp"/>
    </div>
    <script src="app.js"></script>
  </body>
</html>