1

我正在使用带有 Yii 框架的引导扩展来为内容设置选项卡。这是一个例子。这些选项卡在 Firefox 中运行良好,但在 Google Chrome 和 Safari 中,选项卡的行为不同,它们随着页面加载而加载,但在单击选项卡后,它们会被选中,但内容不显示。

以下是这些选项卡的代码:

<?php $this->widget('bootstrap.widgets.BootTabbable', array(
                'type'=>'tabs', // 'tabs' or 'pills'
                'tabs'=>array(
                        array('label'=>'Marionettisti', 'content'=>$this->renderPartial('staff/_view_staff_marionettisti', array('model'=>$model),$this),'active'=>true),
                        array('label'=>'Voci e Musica', 'content'=>$this->renderPartial('staff/_view_staff_vociemusica', array('model'=>$model),$this)),
                        array('label'=>'Laboratorio', 'content'=>$this->renderPartial('staff/_view_staff_laboratorio', array('model'=>$model),$this)),
                        array('label'=>'Direttore Artistico', 'content'=>$this->renderPartial('staff/_view_staff_direttore_artistico', array('model'=>$model),$this)),
                ),
            )); ?>

任何想法?

4

2 回答 2

0

尝试在 renderPartial 中传递第三个和第四个元素 true ,例如

$this->renderPartial('staff/_view_staff_marionettisti', array('model'=>$model),true,true
于 2012-07-25T13:20:44.840 回答
0

检查我们所有的 div 是否在渲染页面中正确关闭。我遇到了同样的问题错误是不恰当地关闭了 div

于 2018-01-11T10:25:08.240 回答