Why background color is not working properly | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why background color is not working properly

I want to change background color from green to red when hovering but it's working but the problem is before I hovered the color is changing from white to green then after hovering it's changed to red ..... Where is the error please help me! And I don't know how to insert the code <!DOCTYPE html> <html lang="en"> <head> <title>Page title</title> <link rel="stylesheet" href="6- Multiple Transform.css"></link> </head> <body> <div class="Box"></div> </body> </html> Css- div{ background:greenyellow; width: 100px; height: 100px; margin-top: 200px; margin-left: 36%; transition:background-color 3s, transform 2s; } div:hover{ background-color: red; transform: rotate(30deg) scale(0.5,2) translate(50px,50px) skew(30deg,30deg) ; }

2nd Oct 2021, 8:44 AM
Sachin
Sachin - avatar
1 Answer
+ 1
Here's tips on how we attach code https://www.sololearn.com/post/75089/?ref=app
2nd Oct 2021, 9:01 AM
Ipang