风格化 Material 复选框 - 悬停时显示复选标记
Stylizing Material Checkbox - Display checkmark on hover
我尝试对 Material 复选框进行样式化(https://material.angular.io/components/checkbox/overview). There are several things that I have done without problems (like change color, border etc). I would like, but I can't seem to do it, only when the checkbox is unchecked, display the checkmark on hover. As the example on the right in the picture, this to indicate that we can click on the checkbox checkbox-hover
有什么想法吗?谢谢!
通过将 SVG 路径的 stroke-dashoffset
设置为 ~23px 来隐藏复选标记。
为了在悬停时显示复选标记,您需要 CSS 规则将此值设置为 0px 并为复选框提供背景颜色,以便可以看到复选标记。
我尝试对 Material 复选框进行样式化(https://material.angular.io/components/checkbox/overview). There are several things that I have done without problems (like change color, border etc). I would like, but I can't seem to do it, only when the checkbox is unchecked, display the checkmark on hover. As the example on the right in the picture, this to indicate that we can click on the checkbox checkbox-hover
有什么想法吗?谢谢!
通过将 SVG 路径的 stroke-dashoffset
设置为 ~23px 来隐藏复选标记。
为了在悬停时显示复选标记,您需要 CSS 规则将此值设置为 0px 并为复选框提供背景颜色,以便可以看到复选标记。