按钮CSS内的SVG颜色更改

我无法通过按钮更改SVG的颜色。我希望将鼠标悬停在带有SVG的按钮上时SVG颜色改变,现在当我将鼠标悬停在该按钮内的SVG图像上时,它才起作用。这是到目前为止我得到的:

.round {
    display: inline-block;
    width: 120px;
    line-height:118px;
    background-color: rgba(100,100,0);
    border:2px solid #0090ff;
    -webkit-border-radius: 200px;
    -moz-border-radius: 200px;
    border-radius: 200px;
    cursor:pointer;
    -webkit-transition: all .2s ease-out;
    -moz-transition: all .2s ease-out;
}

.round:hover {
    background-color: #00aaee;
    border:2px solid #0080b3;
}

.svg:hover {
    filter: brightness(1000%) saturate(0%) contrast(1000%);
}
<a href="/category/aktualnosci/" class="round"><img class="svg" src="/wp-content/uploads/2019/12/gazeta.svg" width="60" height="60"></a><br>

ezeke123 回答:按钮CSS内的SVG颜色更改

类似: .round:hover .svg { filter: brightness(1000%) saturate(0%) contrast(1000%); }

本文链接:https://www.f2er.com/2719654.html

大家都在问