【发布时间】:2018-05-22 01:09:13
【问题描述】:
这个按钮的悬停有问题,当我在#search-button 中通过光标时,我无法使 .icon-search 变白。
.icon-search {
fill: #868585;
width: 20px
}
.icon-search {
margin: 0 20px;
}
#search-button {
border-radius: 0px 2px 2px 0px;
border-color: #303030 !important;
background-color: #343434;
border: 2px solid;
cursor: pointer;
outline: none;
}
#search-button,
.icon-star:hover {
fill: white;
color: white
}
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body>
<button id="search-button" type="submit"><svg aria-hidden="true" class=
"icon icon-search" height="28" viewbox="0 0 26 28" width="26" xmlns=
"http://www.w3.org/2000/svg">
<path d=
"M18 13c0-3.859-3.141-7-7-7s-7 3.141-7 7 3.141 7 7 7 7-3.141 7-7zm8 13c0 1.094-.906 2-2 2a1.96 1.96 0 0 1-1.406-.594l-5.359-5.344a10.971 10.971 0 0 1-6.234 1.937c-6.078 0-11-4.922-11-11s4.922-11 11-11 11 4.922 11 11c0 2.219-.672 4.406-1.937 6.234l5.359 5.359c.359.359.578.875.578 1.406z">
</path></svg></button>
</body>
</html>
强文本
我希望光标通过 .icon-search,#search-button 变白。
【问题讨论】: