Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在yii1.1中使用bootstrap3(网格)的最佳方式是什么?_Php_Css_Twitter Bootstrap_Yii - Fatal编程技术网

Php 在yii1.1中使用bootstrap3(网格)的最佳方式是什么?

Php 在yii1.1中使用bootstrap3(网格)的最佳方式是什么?,php,css,twitter-bootstrap,yii,Php,Css,Twitter Bootstrap,Yii,我想在yiii中使用bootstrap3(网格)。尤其是使用CGridView和其他yii小部件 我真的希望能够应用像“.col-sm-4”这样的类 那么,根据我们到目前为止所知道的情况,在YII1.1(CGridView)中使用Bootstrap3(网格)的最佳方式是什么 感谢使用Boostrap表类设置CGridView小部件的itemCssClass属性 <div class="table-responsive"> <?php ... $this->widget('

我想在yiii中使用bootstrap3(网格)。尤其是使用CGridView和其他yii小部件

我真的希望能够应用像“.col-sm-4”这样的类

那么,根据我们到目前为止所知道的情况,在YII1.1(CGridView)中使用Bootstrap3(网格)的最佳方式是什么


感谢使用Boostrap表类设置CGridView小部件的
itemCssClass
属性

<div class="table-responsive">
<?php
...
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'my-model-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        ...
    ),
    'itemsCssClass' => 'table table-striped table-bordered table-hover table-condensed'
));
...
?>
</div>

.table responsive
类创建响应表。然后,表格将在小型设备上水平滚动(768px以下)。当查看任何大于768px的宽度时,没有区别

.table
类将基本样式添加到表中

.table striped
类将斑马条纹添加到表格中

.table bordered
类在表格和单元格的所有边上添加边框

.table hover
类在表行上添加悬停效果(灰色背景色)

.code>table condensed类通过将单元格填充减半,使表格更加紧凑


我不想成为憎恨者,但bootstrap 3非常重要,如果可能的话,我也不介意使用bootstrap 4和yii 1.1。使用一般功能很容易,但我想使用CGridView就不行了。