当前位置: 首页>>代码示例>>PHP>>正文


PHP TbHtml::carousel方法代码示例

本文整理汇总了PHP中TbHtml::carousel方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::carousel方法的具体用法?PHP TbHtml::carousel怎么用?PHP TbHtml::carousel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TbHtml的用法示例。


在下文中一共展示了TbHtml::carousel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<div class="container" style="height:80%; width:600px;">
<br/>
<h2><div style="text-align:center;">Welcome to Morena e-Salary Slip</div></i></h2>

<p><div style="text-align:center;"><i>MORENA's</i> E-Salary Slip Application</div></p>
<hr/>
<?php 
echo TbHtml::carousel(array(array('image' => Yii::app()->request->baseUrl . '/images/image2.jpg', 'label' => 'PT MANDIRI CIPTA SEJAHTERA', 'caption' => 'MORENA')));
?>
</div><br/><br/>
开发者ID:coderay1100,项目名称:morena,代码行数:10,代码来源:index.php

示例2: testCarousel

 public function testCarousel()
 {
     $I = $this->codeGuy;
     $items = array(array('image' => 'image.png', 'label' => 'First Thumbnail label', 'url' => '#', 'caption' => 'Caption text'), array('image' => 'image.png', 'label' => 'Second Thumbnail label'), array('image' => 'image.png', 'imageOptions' => array('class' => 'image', 'alt' => 'Alternative text')));
     $html = TbHtml::carousel($items, array('id' => 'carousel', 'class' => 'div'));
     $carousel = $I->createNode($html, 'div.carousel');
     $I->seeNodeCssClass($carousel, 'div slide');
     $I->seeNodeAttribute($carousel, 'carousel');
     $I->seeNodeChildren($carousel, array('ol.carousel-indicators', 'div.carousel-inner', 'a.carousel-control', 'a.carousel-control'));
     $inner = $carousel->filter('div.carousel-inner');
     foreach ($inner->children() as $i => $divElement) {
         $div = $I->createNode($divElement);
         $I->seeNodeCssClass($div, 'item');
         switch ($i) {
             case 0:
                 $I->seeNodeCssClass($div, 'active');
                 $I->seeNodeChildren($div, array('a', 'div.carousel-caption'));
                 $a = $div->filter('a');
                 $I->seeNodeAttribute($a, 'href', '#');
                 break;
             case 1:
                 $I->seeNodeChildren($div, array('img', 'div.carousel-caption'));
                 break;
             case 2:
                 $img = $div->filter('img.image');
                 $I->seeNodeAttributes($img, array('src' => 'image.png', 'alt' => 'Alternative text'));
                 break;
         }
     }
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:30,代码来源:TbHtmlTest.php

示例3: foreach

<?php

foreach ($ads as $ad) {
    $items[] = $ad->getAd();
}
echo TbHtml::carousel($items);
开发者ID:jackycgq,项目名称:advanced,代码行数:6,代码来源:ad.php

示例4: array

    array('heading' => 'Media heading', 'content' => '...'),
)); ?></pre>

</section>

<!-- Carousel
   ================================================== -->
<section id="carousel">

   <div class="page-header">
      <h1>Carousel</h1>
   </div>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::carousel(array(array('image' => 'holder.js/830x477', 'label' => 'First Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('image' => 'holder.js/830x477', 'label' => 'Second Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('image' => 'holder.js/830x477', 'label' => 'Third Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.')));
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::carousel(array(
    array('image' => 'holder.js/830x477', 'label' => 'First Thumbnail label', 'caption' => '...'),
    array('image' => 'holder.js/830x477', 'label' => 'Second Thumbnail label', 'caption' => '...'),
    array('image' => 'holder.js/830x477', 'label' => 'Third Thumbnail label', 'caption' => '...'),
)); ?></pre>

</section>


<!-- Miscellaneous
    ================================================== -->
开发者ID:crisu83,项目名称:yiistrap-docs,代码行数:31,代码来源:components.php

示例5: array



	<!-- Carousel
	================================================== -->
	<section id="carousel">
		<div class="page-header">
			<h1>Carousel</h1>
		</div>

		<h2>Example carousel</h2>

		<p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>

		<div class="bs-docs-example">
			<?php 
echo TbHtml::carousel(array(array('content' => '<img src="holder.js/660x380" />', 'label' => 'First Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('content' => '<img src="holder.js/660x380" />', 'label' => 'Second Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('content' => '<img src="holder.js/660x380" />', 'label' => 'Third Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.')), array('style' => 'width: 660px;'));
?>
		</div>
<pre class="prettyprint linenums">
&lt;?php echo TbHtml::carousel(
    array(
        array(
            'content' =&gt; '&lt;img src=&quot;holder.js/660x380&quot; /&gt;',
            'label'   =&gt; 'First Thumbnail label',
            'caption' =&gt; 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. ...',
        ),
        array(
            'content' =&gt; '&lt;img src=&quot;holder.js/660x380&quot; /&gt;',
            'label'   =&gt; 'Second Thumbnail label',
            'caption' =&gt; 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. ...',
        ),
开发者ID:yii-twbs,项目名称:yiistrap-docs,代码行数:29,代码来源:javascript.php


注:本文中的TbHtml::carousel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。