JSFiddle - React, Tailwind, and code Playground
HTML
<div><a href="#"><span>Must... rotate... now!</span></a></div>
CSS
A {
display: block;
line-height: 50px;
padding: 10px 0 10px 70px;
position: relative;
min-height: 50px;
}
A > SPAN {
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
A:hover > SPAN,
A:active > SPAN {
display: block;
-webkit-transform: rotate(-5deg);
-webkit-transform-origin: 0 0;
transform: rotate(-5deg);
transform-origin: 0 0;
}
DIV {
position: relative;
left: 100px;
top: 100px;
}
DIV:before {
background: red;
color: black;
content: "Must not rotate!";
display: block;
padding: 10px;
position: absolute;
left: 0;
top: 0;
width: 50px;
height: 50px;
}