JSFiddle - React, Tailwind, and code Playground

HTML

<div style="position:fixed; width:100%; height:100%;background-image:url(http://e-shuushuu.net/images/2011-07-06-419506.jpeg)" id="ex"></div>

JavaScript

var div = document.getElementById('ex');

div.onmousedown = function(){
    document.onmousemove = function(e){
    div.style.backgroundPosition = 
        e.pageX + 'px  ' + e.pageY + 'px';
    }
    document.onmouseup = function(e){
        document.onmousemove = function(){};
    }
}