簡體   English   中英

使用材料引導庫更改Yii2中的textcolor不起作用

[英]Changing textcolor in Yii2 with material bootstrap library doesnt work

我正在嘗試更改文本的顏色,甚至更改頁腳的背景(例如),但是添加此庫后 ,所有內容都已更改,我什至無法更改文本的顏色。

這是我的MaterialAsset

<?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',
    ];
}

我正在嘗試在我的site.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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM