19EasyUI 布局- 创建 XP 风格左侧面板

简介: 19EasyUI 布局- 创建 XP 风格左侧面板

通常情况下,在 Windows XP 的资源管理器文件夹中,左侧的面板(panel)包含一些常见任务。 本教程向您展示如何通过 easyui 的面板(panel)插件来创建 XP 左侧面板。

案例

自定义面板(panel)的外观效果

请注意,这个视图外观效果不是我们想要的,我们必须改变面板(panel)的头部背景图片和折叠/展开按钮的图标。

做到这一点并不难,我们需要做的只是重新定义一些 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;
    }

完整代码

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="keywords" content="jquery,ui,easy,easyui,web">
  <meta name="description" content="easyui help you build your web page easily!">
  <title>jQuery EasyUI Demo</title>
  <link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/default/easyui.css">
  <link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/icon.css">
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
  <script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js"></script>
  <style>
    .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;
    }
  </style>
</head>
<body>
  <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>
</body>
</html>
目录
相关文章
|
8月前
|
JavaScript 容器
47EasyUI 窗口- 窗口与布局
47EasyUI 窗口- 窗口与布局
24 0
|
8月前
18EasyUI 布局- 添加自动播放标签页(Tabs)
18EasyUI 布局- 添加自动播放标签页(Tabs)
25 0
|
8月前
17EasyUI 布局- 动态添加标签页(Tabs)
17EasyUI 布局- 动态添加标签页(Tabs)
25 0
|
8月前
15EasyUI 布局- 创建折叠面板
15EasyUI 布局- 创建折叠面板
38 0
|
8月前
14EasyUI 布局- 在面板中创建复杂布局
14EasyUI 布局- 在面板中创建复杂布局
21 0
|
8月前
|
容器
13EasyUI 布局- 为网页创建边框布局
13EasyUI 布局- 为网页创建边框布局
21 0
|
8月前
|
移动开发 JavaScript 前端开发
easyui01(基本布局)
easyui01(基本布局)
|
JavaScript 前端开发 API
easyui布局——【入门】
easyui布局——【入门】
easyui布局——【入门】

热门文章

最新文章