Pinch zoom in responsive layout HTML5
HTML
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
</head>
<body>
<img class="img" src="https://stmed.net/sites/default/files/cube-wallpapers-25187-9698686.jpg" />
</body>
</html>
CSS
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column
}
.img {
width: 80vw;
margin: 10px auto;
}
JavaScript
var hammertime = new Hammer(myElement, myOptions);
hammertime.on('pan', function(ev) {
console.log(ev);
});