easyUI-layout布局

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>按钮</title>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="js/jquery-easyui/themes/default/layout.css">
<script src="js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-easyui/jquery.easyui.min.js"></script>
<style>
img {
width: 100px;
height: 100px;
overflow: hidden;
}
.p-search{
background:#fafafa;
padding:5px;
border:1px solid #ccc;
border-bottom:0;
overflow:hidden;
}
.p-search input{
width:300px;
border:1px solid #ccc;
background: #fff url('images/search.png') no-repeat right top;
}
.p-right{
text-align:center;
border:1px solid #ccc;
border-left:0;
width:150px;
background:#fafafa;
padding-top:10px;
}
</style>
<script>
//函数showcontent不能先加载上下文再来执行,否则没有效果
function showcontent(language) {
$('#content').html('Introduction to ' + language + ' language');
}
</script>
</head>
<body>
<div class="easyui-layout" style="width: 400px; height: 200px">
<div region="west" split="true" title="边框布局" style="width: 150px">
<p style="padding:5px;margin:0;">Select language:</p>
<ul>
<li><a href="javascript:void(0)" onclick="showcontent('java')">Java</a></li>
<li><a href="javascript:void(0)" onclick="showcontent('cshape')">C#</a></li>
<li><a href="javascript:void(0)" onclick="showcontent('vb')">VB</a></li>
<li><a href="javascript:void(0)" onclick="showcontent('erlang')">Erlang</a></li>
</ul>
</div>
<div id="content" region="center" title="Language" style="padding:5px;">
</div>
</div>

<br><br><br><br>
<!-- collapsible="true"点击可以折叠-->
<div class="easyui-panel" title="Complex Panel Layout" iconCls="icon-search" collapsible="true"
style="padding:5px;width:500px;height:250px;">
<div class="easyui-layout" fit="true">
<div region="north" border="false" class="p-search">
<label>Search:</label><input/>
</div>
<div region="center" border="false">
<div class="easyui-layout" fit="true">
<div region="east" border="false" class="p-right">
<img src="images/1.jpg"/>
</div>
<div region="center" border="false" style="border:1px solid #ccc;">
<div class="easyui-layout" fit="true">
                        split="true" :分割

<div region="south" split="true" border="false" style="height:60px;">
<textarea style="border:0;width:100%;height:100%;resize:none">Hello,你可以在此输入内容</textarea>
</div>
<div region="center" border="false">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

猜你喜欢

转载自www.cnblogs.com/LindaBlog/p/9224397.html