I need help with an HTML element that needs to rotate when hovered over. Here is the code I have: The issue I'm facing is that I don't want a transition for translateX, only for the rotation. What steps should I take to achieve this?
.cog {
margin-top: 250px;
cursor: pointer;
transition: transform 0.5s ease-in-out;
position: relative;
left: 50%;
transform: translateX(-50%);
}
.cog:hover {
transform: rotate(-.4turn);
}