作者:拍友2502920603 | 来源:互联网 | 2023-05-16 22:48
#myUserMenu {
position: absolute;
background-color: white;
top: 20px;
width: 116px;
border: 1px solid #CCC;
}
#myAvatar:hover #myUserMenu {
background-color: red;
}
.menuItem {
cursor: pointer;
border-bottom: 1px solid #EEE;
}
some text here...
So when I hover the myAvatar, myUserMenu background should change to red
所以当我悬停myAvatar时,myUserMenu背景应该变为红色
#myAvatar:hover #myUserMenu
And nothing happens ! Any idea why ?
没有任何反应!知道为什么吗?
4 个解决方案