Вот код на сам Вид с виджетом
Код: Выделить всё
<?php
use yii\bootstrap\Carousel;
?>
<section id="main-slider" class="no-margin">
<?php
echo Carousel::widget([
'items' => [
// the item contains only the image
[
'content' => '<img src="/images/slider/bd1.jpg"/>',
'caption' => '
<h1 class="animation animated-item-1">1</h1>
<h2 class="animation animated-item-2" ></h2>',
],
[
'content' => '<img src="/images/slider/bd2.jpg"/>',
'caption' => '
<h1 class="animation animated-item-1">2</h1>
<h2 class="animation animated-item-2" ></h2>',
],
// the item contains both the image and the caption
[
'content' => '<img src="/images/slider/bd3.jpg"/>',
'caption' => '<h1 class="animation animated-item-1">3</h1>
<h2 class="animation animated-item-2" ></h2>',
],
]
]);
?>
</section>