YII框架-删除视图中的条纹


YII framework - Remove stripes in view form

yii框架-删除视图中的条纹??

    <?php
    $this->widget('bootstrap.widgets.TbDetailView', array(
        'data' => $model,
        'attributes' => array(
            'creationdt',
            'Objective',
            'period',
            'materials_required',
            'work_desc',
            'attachment',
            'Attention_Reqired',
        ),
    ));
    ?>

使用type定义表类型

一般Bootstrap CSS有3种类型的表类。他们是条纹, 凝聚

Bootstrap yii widjet默认具有条纹我猜。因此,在代码中定义类型。

    <?php
    $this->widget('bootstrap.widgets.TbDetailView', array(
        'data' => $model,
        'type'=>'bordered condensed', //added
        'attributes' => array(
            'creationdt',
            'Objective',
            'period',
            'materials_required',
            'work_desc',
            'attachment',
            'Attention_Reqired',
        ),
    ));
    ?>