The CClientScript class is used in Yii to manage the css file of the view. How to use:
Introduce the css file
(recommended related article tutorials:yii framework)
getClientScript()->registerCssFile("/css/main.css"); ?>
The advantage of using the CClientScript class to introduce files (js/css) is that we can introduce the private files of the view in different view files instead of in the layout Introducing it into the file can save resources.
For more programming related content, please pay attention to theProgramming Introductioncolumn on the php Chinese website!
The above is the detailed content of How to import css files into yii. For more information, please follow other related articles on the PHP Chinese website!