Home  >  Article  >  php教程  >  Yii Framework 开发教程 Zii组件-Resizable示例

Yii Framework 开发教程 Zii组件-Resizable示例

WBOY
WBOYOriginal
2016-06-13 10:53:541097browse

CJuiResizable可以使包含在其中的UI组件支持缩放功能,它封装了 JUI Resizable插件,

 

CJuiResizable基本使用方法如下:

 

 

[php]  

beginWidget('zii.widgets.jui.CJuiResizable', array(  

    'options'=>array(  

                'minWidth'=>50,  

                'minHeight'=>50,  

                'maxWidth'=>500,  

                'maxHeight'=>500,  

                ),  

            'htmlOptions'=>array(  

                'style'=>'width: 150px; height: 150px;  

                 padding: 0.5em; border: 1px solid #e3e3e3; background: #f7f7f7'  

                ),  

            ));  

echo 'Your resizable content here';  

  

$this->endWidget();  

?>  

 

beginWidget('zii.widgets.jui.CJuiResizable', array(

'options'=>array(

'minWidth'=>50,

'minHeight'=>50,

'maxWidth'=>500,

'maxHeight'=>500,

),

'htmlOptions'=>array(

'style'=>'width: 150px; height: 150px;

padding: 0.5em; border: 1px solid #e3e3e3; background: #f7f7f7'

),

));

echo 'Your resizable content here';

 

$this->endWidget();

?>

 

 

把需要支持缩放功能的内容定义在CJuiResizable的beginWidget和endWidget直接就可以实现缩放功能。

 

 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php之分页类代码Next article:ColaPHP 2.0α发布