PHP code example of raoul2000 / yii2-backstretch-widget
1. Go to this page and download the library: Download raoul2000/yii2-backstretch-widget library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
raoul2000 / yii2-backstretch-widget example snippets
raoul2000\widget\backstretch\Backstretch::widget([
'selector' => '#elementId',
'pluginOptions' => [
[
'path/to/image1.jpg',
'http://hostname1/path/to/image2.jpg',
'http://hostname2/path/to/image3.jpg'
],
[
'duration' => 3000,
'fade' => 'slow',
'centeredX' => true,
'centeredY' => true
]
]
]);
raoul2000\widget\backstretch\Backstretch::widget([
'pluginOptions' => 'path/to/image1.jpg'
]);
php composer.phar