0

i hope everyone is doing well today. I am new to HTML and CSS and I would appreciate your help, please. I would like to shift and rotate an image (at the same time) when i hover the mouse over the image. However I have only been able to achieve either rotation, or shifting but not both. I would like to do this using CSS and here is the code.

In general, I am using Mozilla Firefox to test out most of my HTML and CSS code but I do understand for Google Chrome and IE I should use similar code like -webkit-transform and -ms-transform.

Thank you!

.data3 img:hover{
transform:rotate (70deg);
transform: translate3d(80px,0px,0px);
transition: transform .5s ease-out;/*want to rotate and shift slowly*/
}
0

1 Answer 1

0

Put the tanslate and the rotate command behind each other:

transform: rotate(90deg) translateX(50px);

Already answered here.

Sign up to request clarification or add additional context in comments.

1 Comment

thank you very much, it works :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.