可以用css做到这一点吗?将鼠标悬停在其中一个元素上时:text2、text3、text4、text1 将颜色更改为“小麦”
.list {
display: flex;
}
.item {
margin-right: 15px;
padding: 10px;
background: wheat;
}
.item:first-child {
background: #ccc;
}
.item:hover {
background: #ccc;
}
<div class="list">
<div class="item">text1</div>
<div class="item">text2</div>
<div class="item">text3</div>
<div class="item">text4</div>
</div>

