【发布时间】:2014-08-12 17:18:13
【问题描述】:
在执行可排序或拖动移动时,我需要一些帮助来保持 CSS 样式(td 宽度等)。
到目前为止我的代码:
CSS:
body {
margin: 30px;
}
table {
border-collapse: separate;
border-spacing: 0;
min-width: 350px;
}
table tr th,
table tr td {
border-right: 1px solid #bbb;
border-bottom: 1px solid #bbb;
padding: 5px;
}
table tr th:first-child,
table tr td:first-child {
border-left: 1px solid #bbb;
}
table tr th {
background: #eee;
border-top: 1px solid #bbb;
text-align: left;
}
/* top-left border-radius */
table tr:first-child th:first-child {
border-top-left-radius: 6px;
}
/* top-right border-radius */
table tr:first-child th:last-child {
border-top-right-radius: 6px;
}
/* bottom-left border-radius */
table tr:last-child td:first-child {
border-bottom-left-radius: 6px;
}
/* bottom-right border-radius */
table tr:last-child td:last-child {
border-bottom-right-radius: 6px;
}
当我开始在表 1 上拖动一行时,该行失去了上边框。我该如何解决这个问题?
【问题讨论】:
标签: jquery css draggable jquery-ui-sortable css-tables