JSFiddle - React, Tailwind, and code Playground
HTML
<input id="play" type="button" value="" />
CSS
#play {
height:50px;
width:50px;
background-image: url("http://th09.deviantart.net/fs71/150/i/2013/071/2/e/play_pause_stop_by_ylook4art-d5xsfq1.jpg");
}
JavaScript
function swap(obj) {
obj.clicked = (obj.clicked) ? false : true;
obj.style.backgroundPosition = (obj.clicked) ?'-50px 0':"0 0";
}
document.getElementById('play').onclick = function () {
swap(this);
}