作者:spring709272032 | 来源:互联网 | 2023-05-17 17:39
Ineedlittlehelpwith:hoveronmultipleobjectswithdifferentcolors.WhenIhoveronthefirst
I need little help with :hover
on multiple objects with different colors. When I hover on the first section, the second one should change the color too.
我需要一些帮助:将鼠标悬停在具有不同颜色的多个对象上。当我将鼠标悬停在第一部分时,第二部分也应该改变颜色。
HTML
CSS
.object1 {
background-color:#F00;
width:100px;
height:50px;
}
.object2 {
background-color:#00F;
width:100px;
height:50px;
}
.object1:hover{
background-color:#FF0;
}
.object2:hover {
background-color:#000;
}
Thanks for reading :)
谢谢阅读 :)
1 个解决方案