Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am attaching the image below. Can someone help me with the code and tell me why hovering effect doesn't occur over Image here. Below is the code snippet : Css code

Js code

Final output is just the image with no hover effect :Like this

question from:https://stackoverflow.com/questions/65645111/image-hover-effect-in-reactjs

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
284 views
Welcome To Ask or Share your Answers For Others

1 Answer

the problem was that you are separating the "deg" from the number you want to rotate. It would be:

.container:hover img{
      transform: rotate(15deg) scale(1.5);
 }

You can test it here: https://codesandbox.io/s/eloquent-moore-jem2j?file=/src/Card.css


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...