A
A
agent11562017-01-19 17:24:58
Yii
agent1156, 2017-01-19 17:24:58

How to include fonts in yii2?

How to include fonts in yii2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shoxabbos Olimjonov, 2017-01-19
@shoxabbos1994

<?php
namespace app\assets;

use yii\web\AssetBundle;

class FontAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        '//fonts.googleapis.com/css?family=Open+Sans:400,700',
        '//fonts.googleapis.com/css?family=Ubuntu:400,700',
        '//fonts.googleapis.com/css?family=Oswald:400,700'
    ];
    public $cssOptions = [
        'type' => 'text/css',
    ];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question