JSFiddle - React, Tailwind, and code Playground

HTML

<a id="90" href="#">90</a>
<a id="180" href="#">180</a>
<a id="270" href="#">270</a>
<div id="page" style="position: relative; background: #ccc; width: 500px; height: 600px;">
    <div id="container" style="top: 50px; left: 100px; width: 200px; height: 200px; position: absolute; background: #fff;"> 
        <img id="my_image" src="http://lorempixel.com/200/100/">
    </div>
</div>

CSS

img {
    transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -webkit-transform: rotate(90deg);
}

JavaScript

$('a').click(function(e) {
    e.preventDefault();
    var angle = $(this).attr("id");
    console.log("angle");
    $("#my_image").css({
      transform: 'rotate('+angle+'deg)',
      '-moz-transform': 'rotate('+angle+'deg)',
      '-webkit-transform': 'rotate('+angle+'deg)'
    });
});