A
A
agent11562017-01-10 17:54:34
Yii
agent1156, 2017-01-10 17:54:34

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

2 answer(s)
S
Snewer, 2017-01-10
@Snewer

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'
];

D
Decadal, 2017-01-10
@Decadal

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 question

Ask a Question

731 491 924 answers to any question