一个可拖拽列宽表格实例演示一个可拖拽列宽表格实例演示
代码如下:
<DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″>
<style>
body{
font:12px/1.5 Tahoma;
}
#gannt_left{
width:500px;
}
#left-scroll-panel{
width:520px;
height:100px;
overflow-y: auto;
}
table{
table-layout:fixed;
border-collapse: collapse;
border-spacing: 0px;
text-align:center;
width:500px;
}
table,th,td{
border:1px solid #afe0ea;
}
th,td{
height:20px;
line-height:20px;
overflow: hidden;
text-overflow:ellipsis;
white-space:nowrap;
word-wrap:normal;
word-break:keep-all;
}
th{
background:#adf5ff;
}
td{
background:#f6fcff;
}
#gannt_grid,#gannt_grid td{
border-top:0px none;
}
</style>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”></script>
</head>
<body>
<div id=”gannt_left”>
<div id=”left-scroll-panel” class=”scroll-panel”>
<table id=”gannt_grid”>
<thead>
<tr>
<th width=”30″>序号</th>
<th width=”35″>操作</th>
<th>标题</th>
<th width=”80″>执行人</th>
<th width=”80″>开始时间</th>
<th width=”80″>结束时间</th>
<th width=”30″>天数</th>
</tr>
</thead>
<tbody>