代码之家  ›  专栏  ›  技术社区  ›  chirag sorathiya

角6scss误差

  •  0
  • chirag sorathiya  · 技术社区  · 6 年前

    我使用的是Angular6.0.1,当我创建一个style类时,它会给我一个错误,比如在screen short中,您还可以看到我的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"
    

    我犯了错误 enter image description here

    我的代码看起来像

    .mat-sidenav-container
       position: fixed
       height: 100%
    
    1 回复  |  直到 6 年前
        1
  •  2
  •   Pranay Rana    6 年前

    应该是这样,

    .mat-sidenav-container
    {
       position: fixed;
       height: 100%;
    }
    

    你需要 {} 在你的css类周围你正在定义。