欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

使用Jquery EasyUI进行页面布局(代码教程)

程序员文章站 2022-07-06 07:53:38
下面为为大家介绍一种快速搭建页面布局的方法,那就是使用easyui进行布局。 在布局之前首先要从easyui包里面引用五个文件。

下面为为大家介绍一种快速搭建页面布局的方法,那就是使用easyui进行布局。

在布局之前首先要从easyui包里面引用五个文件。

 <link href="easyui/themes/material/easyui.css" rel="stylesheet" />
    <link href="easyui/themes/icon.css" rel="stylesheet" />--图片样式
    <script src="easyui/jquery.min.js"></script>
    <script src="easyui/jquery.easyui.min.js"></script>
    <script src="easyui/locale/easyui-lang-zh_cn.js"></script>--使用语言

--图片样式 --使用语言

创建布局有很多种方法:

1. 通过标签创建布局

<p id="cc" class="easyui-layout" style="width:600px;height:400px;">  

 <p data-options="region:'north',title:'north title',split:true" style="height:100px;"></p>  

  <p data-options="region:'south',title:'south title',split:true" style="height:100px;"></p> 

  <p data-options="region:'east',iconcls:'icon-reload',title:'east',split:true" style="width:100px;"></p>

   <p data-options="region:'west',title:'west',split:true" style="width:100px;"></p>

  <p data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></p>

  </p>  

2. 使用完整页面创建布局

<body class="easyui-layout">  

    <p data-options="region:'north',title:'north title',split:true" style="height:100px;"></p>

    <p data-options="region:'south',title:'south title',split:true" style="height:100px;"></p>

    <p data-options="region:'east',iconcls:'icon-reload',title:'east',split:true" style="width:100px;"></p>

    <p data-options="region:'west',title:'west',split:true" style="width:100px;"></p>    

   <p data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></p> 

  </body >

布局可以分为五个部分,东、西、南、北、中,其中“中”间部分是必须要有的,要写你的内容,其他的可以进行选择性的删除。

使用Jquery EasyUI进行页面布局(代码教程)

还可通过title来改变标题。