After installing bulma through NPM, how can I refer it in my project

前端 未结 7 1730
北荒
北荒 2021-02-02 06:15

I have pulled in bulma in my project through :

$ npm install bulma

After that, how can I refer to it in my pages. I really don\'t know how to

7条回答
  •  借酒劲吻你
    2021-02-02 06:48

    @import "../node_modules/bulma/css/bulma.css";

    If you have a main.css file for your project or something similar to that, you can add the above line inside your main.css file. This will import the default bulma.css file located inside your project's path node_modules/bulma/css/ after you have installed bulma via npm.

    NOTE: you must include your main.css file( or something similar) inside your index.html as a static import if you chose to go this way. For that you need to have something like:

    
    

    I prefer this since bulma is a CSS framework, I think it's best to keep the stylesheets linked with each other.

提交回复
热议问题