VS code CSS class selector not found with angular and bootstrap 5 beta

前端 未结 11 1890
陌清茗
陌清茗 2021-02-05 02:31

I\'m using bootstrap 5 with angular and I add style and script to angular.json but the problem in VS Code it does not recognize the bootstrap classes.

11条回答
  •  清歌不尽
    2021-02-05 03:29

    Install this extension https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css

    Then in your .vscode/settings.json:

    {
      "css.styleSheets": [
        "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0beta1/dist/css/bootstrap.min.css"
      ]
    }
    

    Restart vscode. Worked for me.

提交回复
热议问题