问题在于调整大小时div不适合单元格并在单元格下跳转,因为您可以在image中看到“Column1”。我建议属性“溢出:隐藏”应该修复它,但没有运气。
CSS:
.ui-column-resizable
{
float:right;
height:20px !important;
display:inline;
cursor:w-resize;
position:relative;
overflow:hidden;
text-align:center;
white-space:nowrap;
background-color:blue;
margin: -2px -2px -2px 0;
}
.ui-column-draggable
{
height:17px;
cursor:move;
position:relative;
overflow:hidden;
background-color:yellow;
white-space:nowrap;
text-align:center;
}
JavaScript的:
column.innerHTML = "<span class='ui-column-resizable'> </span>" +
"<div class='ui-column-draggable'>" +
column.innerHTML +
"</div>";
答案 0 :(得分:1)
应该这样做......
HTML:
<td>
<div class="drag">
Column 1
<div class="resize"></div>
</div>
</td>
CSS:
.drag {
position:relative;
background-color:yellow;
padding:1px 10px 1px 5px;
cursor:move;
}
.resize {
position:absolute;
background-color:blue;
right:0;
width:5px;
top:0;
height:100%;
cursor:w-resize;
}