<div id="container">
<div class="box"></div>
</div>
body, html {
height: 100%;
width: 100%;
}
body {
background-color:black;
}
#container {
background-color: #333;
height:100%;
width: 100%;
overflow:hidden;
position:relative;
}
.box {
background-image: url(https://www.shiftfestival.cc/mapa-completo.png);
background-size: 100%;
background-position: center;
width: 3333px;
height: 2182px;
position: absolute;
}
/*
See https://www.greensock.com/draggable/ for details.
This demo uses ThrowPropsPlugin which is a membership benefit of Club GreenSock, https://www.greensock.com/club/
*/
var $container = $("#container");
function update() {
Draggable.create(".box", {
bounds:$container,
edgeResistance:0.65,
type:"x,y",
throwProps:true,
autoScroll:true,
});
}
update();
This Pen doesn't use any external CSS resources.