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

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

WBOY
Release: 2016-06-13 10:53:54
Original
1150 people have browsed it

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直接就可以实现缩放功能。

 

 

 

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template