Html CSS将鼠标悬停在按钮上时更改跨距的颜色
当我将鼠标悬停在按钮上时,如何选择html中的跨距使其中的文本变为白色Html CSS将鼠标悬停在按钮上时更改跨距的颜色,html,css,Html,Css,当我将鼠标悬停在按钮上时,如何选择html中的跨距使其中的文本变为白色 <button type="button" class="multiselect dropdown-toggle none" data-toggle="dropdown" title="Auckland" style="width: 100%; overflow: hidden; text-overflow: ellipsis;"> <span class="multiselect-selected
<button type="button" class="multiselect dropdown-toggle none" data-toggle="dropdown" title="Auckland" style="width: 100%; overflow: hidden; text-overflow: ellipsis;">
<span class="multiselect-selected-text" style="visibility: visible;">Auckland</span>
<b class="caret"></b>
</button>
更改css,如:
button.multiselect:hover > span {
color: #fff;
}
因为,您想要按钮上的悬停效果
button.multiselect:hover > span {
color: #fff;
}