2016-07-28 32 views
1

actioncolumn Überschrift und Schriftfarbe auf Index-Seite zu ändern, die mein Code für Farbe im Index Ändernwie in yii2

ist
[ 
    'class' => 'yii\grid\ActionColumn', 
    'contentOptions' => ['style' => 'width:100px;'], 
    'header'=>'Actions', 
], 

Antwort

1

Sie headerOptions Eigenschaft verwenden können von ActionColumn Klasse

[ 
    'class' => 'yii\grid\ActionColumn', 
    'contentOptions' => ['style' => 'width:100px;'], 
    'header'=>'Actions', 
    'headerOptions' => [ 
     'style' => 'color:red' 
    ] 
], 

ActionColumn ApiDoc

0

schreiben diese in Ihrem benutzerdefinierten Css

.action-column{ 
color : red ; 
} 
1

Sie verwenden einfach headerOptions, um die Kopffarbe festzulegen. unten zeigen Code

Siehe Action Column

[ 
    'class' => 'yii\grid\ActionColumn', 
    'header' => 'Actions', 
    'headerOptions' => ['style' => 'color:blue'] 
],