我在项目中使用的是Angular Material,但我想更改mat-checkbox的颜色,但不想使用主题,因此,我在Chrome浏览器中显然使用了Elements和Styles部分,并跟踪了mat-checkbox使用并找到的类此:“。mat-checkbox-ripple .mat-ripple-element”。
::ng-deep .mat-checkbox-ripple .mat-ripple-element {
background-color: black!important;
}
Run Code Online (Sandbox Code Playgroud)
因此,这是我的代码,我尝试了:: ng-deep,/ deep /,并且没有任何结果,结果始终相同,复选框的颜色未更改,但是在“样式”中我可以清楚地看到它说我已经覆盖了它的颜色。
这是我使用的事物的版本:
"@angular/animations": "^7.1.4",
"@angular/cdk": "^7.2.0",
"@angular/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/material": "^7.2.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
Run Code Online (Sandbox Code Playgroud)
如何更改颜色?
我正在开发一个使用 js-ipfs 的浏览器应用程序。在我发布 ipfs 地址(例如 /ipfs/Qm...)后,我成功获取返回的名称(即 /ipns/Qm..)。但问题是我无法在其他任何地方(本地节点的网关、公共网关等)解决它,但在同一个浏览器应用程序中,这是非常有问题的......
如何解决这个问题?我相信这与浏览器不支持 DHT 有关,但不知道如何解决它......