有没有更简洁的方法来做到这一点:
#highlighttext:hover + highlightbox {
background-color: #0000AA;
}
#highlighttext:hover {
color: #0000AA;
}
最佳答案
您提供的不是最简洁的方法。
关于html - CSS 在悬停时更改两个元素的不同属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19827665/