如果我使用 <span matRipple matRippleColor="red">Text</span>
,一切都变红了,我再也无法阅读我的文字了。
有没有办法只让背景变红而不让文字变红?
最佳答案
您需要使用绝对位置和 z-index: 1 作为文本值
<span matRipple matRippleColor="red">
<span style="position:absolute; z-index:1">Text</span>
</span>
关于css - matRipple 的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59741060/