I am using scale to enlarge an element on hover, and it was working fine until I added transform:translate(-50%,-50%); . Then it started to scale the element from the bottom right, not from the center. Here is my code:
.skyimage{
height:100px;
width:100px;
position:absolute;
left:50%;
transform:translate(-50%,-50%);
top:150px;
transition:.5s;
background:transparent;
}
.skyimage:hover{
transform:scale(1.2) translate(-50%,-50%);
}