2016-09-04 81 views
2

如何更改分頁的css? 我有代碼:Yii2分頁改變樣式

echo LinkPager::widget([ 
'pagination' => $pages, 
'activePageCssClass'=>'act', 
]); 

和我的CSS行爲類:

.act{ 
    color:red; 
} 

但它不工作。 我必須爲它寫什麼選項?

+0

完整的配置是否有鏈接的類'act'?你可以使用螢火蟲檢查它嗎? –

回答

0

這是分頁

<?php 
LinkPager::widget([ 
    'pagination' => $pages, 
    //Css option for container 
    'options' => ['class' => ''], 
    //First option value 
    'firstPageLabel' => '&nbsp;', 
    //Last option value 
    'lastPageLabel' => '&nbsp;', 
    //Previous option value 
    'prevPageLabel' => '&nbsp;', 
    //Next option value 
    'nextPageLabel' => '&nbsp;', 
    //Current Active option value 
    'activePageCssClass' => 'p-active', 
    //Max count of allowed options 
    'maxButtonCount' => 8, 

    // Css for each options. Links 
    'linkOptions' => ['class' => ''], 
    'disabledPageCssClass' => 'disabled', 

    // Customzing CSS class for navigating link 
    'prevPageCssClass' => 'p-back', 
    'nextPageCssClass' => 'p-next', 
    'firstPageCssClass' => 'p-first', 
    'lastPageCssClass' => 'p-last', 
]);