原創|使用教程|編輯:龔雪|2015-11-23 09:08:40.000|閱讀 701 次
概述:通常情況下,在Windows XP的資源管理器文件夾中,左側的面板包含了一些常見的任務。本教程教你如何通過easyui的面板插件來創建XP風格的左側面板。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Kendo UI for jQuery——創建現代Web應用程序的最完整UI庫!查看詳情>>>
通常情況下,在Windows XP的資源管理器文件夾中,左側的面板包含了一些常見的任務。本教程教你如何通過easyui的面板插件來創建XP風格的左側面板。
我們定義了多個面板來顯示一些任務,每個面板至少應該有折疊/展開工具按鈕。該代碼如下:
<div style="width:200px;height:auto;background:#7190E0;padding:5px;"> <div class="easyui-panel" title="Picture Tasks" collapsible="true" style="width:200px;height:auto;padding:10px;"> View as a slide show<br/> Order prints online<br/> Print pictures </div> <br/> <div class="easyui-panel" title="File and Folder Tasks" collapsible="true" style="width:200px;height:auto;padding:10px;"> Make a new folder<br/> Publish this folder to the Web<br/> Share this folder </div> <br/> <div class="easyui-panel" title="Other Places" collapsible="true" collapsed="true" style="width:200px;height:auto;padding:10px;"> New York<br/> My Pictures<br/> My Computer<br/> My Network Places </div> <br/> <div class="easyui-panel" title="Details" collapsible="true" style="width:200px;height:auto;padding:10px;"> My documents<br/> File folder<br/><br/> Date modified: Oct.3rd 2010 </div> </div>
請注意,如果這個視圖的外觀效果不是我們想要的,那么我們必須更改面板頭部背景圖片和折疊/展開按鈕的圖標。做到這一點并不是很難,我們應該重新定義一些CSS。
.panel-body{ background:#f0f0f0; } .panel-header{ background:#fff url('images/panel_header_bg.gif') no-repeat top right; } .panel-tool-collapse{ background:url('images/arrow_up.gif') no-repeat 0px -3px; } .panel-tool-expand{ background:url('images/arrow_down.gif') no-repeat 0px -3px; }
由此可見,使用easyui定義用戶界面是非常簡單的。
下載該EasyUI示例:
購買最新正版授權!""
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網