当我将鼠标悬停在 Ant DesignRate
组件中的星星上时,它的大小会增加,鼠标移开时它会恢复到原始大小。这可能是由于transform: scale(x)
组件的先天性。如果我将鼠标悬停在星星上,我想停止这些星星的动画/行为。我怎样才能做到这一点?我element state
在 devtools 中尝试过不同的但失败了。
我可以设置自定义width
,height
但我找不到可以阻止动画/转换的东西:/。代码沙箱
.ant-rate-star.ant-rate-star-full i svg {
width: 15px;
height: 20px;
margin: -3.5px;
}
.ant-rate-star.ant-rate-star-zero i svg {
width: 15px;
height: 20px;
margin: -3.5px;
}
.ant-rate-star.ant-rate-star-half.ant-rate-star-active i svg {
width: 15px;
height: 20px;
margin: -3.5px;
}
.ant-rate-star.ant-rate-star-full i svg:hover {
transform: scale(1); //not working
}