Adding external CSS file to a BoilerplateJS project

蓝咒 提交于 2019-12-11 02:11:05

问题


I'm trying to incorporate some UI components to a BoilerplateJS project that I'm currently working on, to be specific I want to implement this [http://wijmo.com/wiki/index.php/Getting_Started_with_Wijmo] sample inside a BoilerplateJs component. How can I add the external css files to my BoilerplateJs project.


回答1:


There are several ways to import style-sheets.

  1. Directly in the index file. (Best suited for style-sheets of libraries such as jQueryUI and Wijmo in your case)
  2. As a theme, in themes module
  3. As a part of the module, in modules folder (Best suited for module specific styles such as position within the module, and module images).

For module specific styling, you can include files by file path (example):

Boiler.ViewTemplate.setStyleLink(cssPath);

or by CSS text itself:

Boiler.ViewTemplate.setStyleText(cssText);


来源:https://stackoverflow.com/questions/12455785/adding-external-css-file-to-a-boilerplatejs-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!