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