Yii 1.1: egradient

Create Gradient Bakcground
4 followers

Create a CSS gradient background

Requirements

...requirements of using this extension (e.g. Yii 1.1 or above)...

Usage

extract to protected/extentions

<?php $this->widget('ext.egradient.EGradient',
array(
'target'=>'#grad1'
));?>
 
<?php $this->widget('ext.egradient.EGradient',
array(
'target'=>'#grad2',
'color1'=>'#2AA737',
'color2'=>'#00703A'
));?>
 
<?php $this->widget('ext.egradient.EGradient',
array(
'target'=>'#grad3',
'color1'=>'#2AA737',
'color2'=>'#00703A',
'style'=>'toTop'
));?>
 
<div id="grad1" style="width:300px;height:100px;"></div>
<br />
<div id="grad2" style="width:300px;height:100px;"></div>
<br />
<div id="grad3" style="width:300px;height:100px;"></div>

Resources

Total 3 comments

#10483 report it
nitropenta at 2012/10/31 03:29am
o.k.

ah.. o.k.

#10478 report it
Ahyo Haryanto at 2012/10/30 10:31pm
@nitropenta

yes, you just change target to any class do you want here for example:

<?php $this->widget('ext.egradient.EGradient',
array(
'target'=>'.grad'
));?>
 
<div class="grad" style="width:300px;height:100px;"></div>
<br />
<div class="grad" style="width:100px;height:300px;"></div>
<br />
<div class="grad" style="width:400px;height:200px;"></div>
<br />
#10463 report it
nitropenta at 2012/10/30 05:16am
append as CSS-Class

Hi

I think it´s better to append the gradient as a CSS-Class - so you can style different div-container or other in once.

best

Leave a comment

Please to leave your comment.

Create extension