Answer the question
In order to leave comments, you need to log in
How to add style?
How to include such script in yii2 template?
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
Answer the question
In order to leave comments, you need to log in
If you connect through an asset, for example, AppAsset, then in the $css property array, specify the path to this style:
$css = [
'https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css'
];
and if not, then in the view:
The first url parameter, you can use the @web alias.
depends is indicated if you need to include a css file after some asset (built-in or custom). You can not specify an array of settings at all.
Documentation
In Russian about resources
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question