使用材料引导库更改Yii2中的文本颜色不起作用


Changing textcolor in Yii2 with material bootstrap library doesnt work

我试图更改文本的颜色,甚至页脚的背景(例如),但添加此库后,一切都发生了变化,我甚至无法更改文本的色彩。

这是我的物料资产:

<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
namespace frontend'assets;
use yii'web'AssetBundle;
/**
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class MaterialAsset extends AssetBundle
{
    public $sourcePath = '@themes/material';
    public $baseUrl = '@web';
    public $css = [
        'css/material.min.css',
        'css/material-fullpalette.min.css',
        'css/ripples.min.css',
        'css/roboto.min.css',
        'css/site.css',
    ];
    public $js = [
        'js/material.min.js',
        'js/ripples.min.js',
    ];
    public $depends = [
        'yii'web'YiiAsset',
        'yii'bootstrap'BootstrapAsset',
    ];
}

我正试图在我的站点中使用它。css:

html,
.footer {
    height: 180px;
    background-color: #222222;
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}
.customtext {
    color: white;
}
.wrap {
    min-height: 100%;
    height: auto;
    margin: 0 auto -60px;
    padding: 0 0 60px;
}
.wrap > .container {
    padding: 70px 15px 20px;
}
.not-set {
    color: #c55;
    font-style: italic;
}
/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Glyphicons Halflings', fantasy;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    padding-left: 5px;
}
a.asc:after {
    content: /*"'e113"*/ "'e151";
}
a.desc:after {
    content: /*"'e114"*/ "'e152";
}
.sort-numerical a.asc:after {
    content: "'e153";
}
.sort-numerical a.desc:after {
    content: "'e154";
}
.sort-ordinal a.asc:after {
    content: "'e155";
}
.sort-ordinal a.desc:after {
    content: "'e156";
}
.grid-view th {
    white-space: nowrap;
}
.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}
.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

关于这一行,甚至那个页脚。

.customtext {
    color: white;
}

在我的索引中添加后:

<p class="text-success customtext">News</p>

但这根本不起作用。

如何更改此应用程序中文本的颜色或页脚的颜色?

如果你不能用其他方式,你只能尝试像这样的内联样式

 <p style="color: white;">News</p>