JSFiddle - React, Tailwind, and code Playground

by wind_chime18

HTML

<div id="compass">
  <div id="arrow"></div>
</div>

CSS

#compass {
  width: 380px;
  height: 380px;
  background-image:url('http://i.imgur.com/44nyA.jpg');
  position: relative;
}
#arrow {
  width: 40%;
  height: 10px;
  background-color:#F00;
  position: absolute;
  top: 185px;
  left: 40px;
  -webkit-transform:rotate(180deg);
  -moz-transform:rotate(180deg);
  -o-transform:rotate(180deg);
  -ms-transform:rotate(180deg);

  -moz-transition: all 1s ease;
  -webkit-transition: all 1s ease;
  -o-transition: all 1s ease;
  transition: all 1s ease;
  
  transform-origin: right;
}

#compass:hover #arrow {
  -webkit-transform:rotate(0deg);
  -moz-transform:rotate(0deg);
  -o-transform:rotate(0deg);
  -ms-transform:rotate(0deg);
  transform-origin: right;
}