我使用的是angular 6.0.1,当我创建样式类时,它给我类似屏幕短屏的错误,您还可以看到我的package.json
"dependencies": {
"@angular/animations": "6.1.0",
"@angular/cdk": "6.4.1",
"@angular/common": "6.1.0",
"@angular/compiler": "6.1.0",
"@angular/core": "6.1.0",
"@angular/forms": "6.1.0",
"@angular/http": "6.1.0",
"@angular/material": "6.4.1",
"@angular/platform-browser": "6.1.0",
"@angular/platform-browser-dynamic": "6.1.0",
"@angular/router": "6.1.0",
"angular2-notifications": "^1.0.2",
"bootstrap": "3.3.7",
"core-js": "2.5.4",
"rxjs": "6.0.0",
"zone.js": "0.8.26"
我的代码看起来像
.mat-sidenav-container
position: fixed
height: 100%
答案 0 :(得分:2)
应该像,
.mat-sidenav-container
{
position: fixed;
height: 100%;
}
您需要在要定义的CSS类周围使用{}
。