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>
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
@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 />
o.k.
ah.. o.k.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.