[英]Turning off the background shadow on Angular Material Accordion?
In this demo I managed to turn off the background shadow on the Angular Material Accordion using this rule: 在此演示中,我设法使用以下规则关闭 Angular Material Accordion 上的背景阴影:
.mat-expansion-panel:not([class*='mat-elevation-z']) {
box-shadow: none !important;
/* box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%); */
}
I have never seen this type of rule ( [class*=...]
) before.我以前从未见过这种类型的规则 (
[class*=...]
)。
Can someone explain what this does?有人可以解释这是做什么的吗?
It's an attribute wildcard selector.它是一个属性通配符选择器。 it looks for any child element under.mat-expansion-panel that has a class that [class*='mat-elevation-z'] element.
它会在 .mat-expansion-panel 下查找具有 [class*='mat-elevation-z'] 元素类的任何子元素。
Here are some links that help you more to understand about wildcard selector这里有一些链接可以帮助您更多地了解通配符选择器
Thanks!谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.