css
想做一个表格 效果如下
不知道如何操作
回复讨论(解决方案) table
{
border: solid 1px black;
}
table tr td
{
border-left: 1px solid black;
border-bottom: 1px solid black;
}
1 1 1 1 1
1 1 1 1 1
11
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
还可以简单点。。
1 1 1 1 1
1 1 1 1 1
11
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
td { border-right:1px solid #ccc; border-bottom:1px solid #ccc; width:50px; height:50px; } table { border-collapse:collapse; empty-cells:show; } td:last-child { border-right:none; } tr:last-child td { border-bottom:none; }
因为单元格没有内容,所以你实际上可以去掉
width,height
及empty-cells
因为单元格没有内容,所以你实际上可以去掉
width,height
及empty-cells
单元格实际上是有内容的
因为单元格没有内容,所以你实际上可以去掉
width,height
及empty-cells
单元格实际上是有内容的
晕,我说我写的td中没有内容。
因为单元格没有内容,所以你实际上可以去掉
width,height
及empty-cells
单元格实际上是有内容的
晕,我说我写的td中没有内容。
多谢指点, 这样的功能是否能用js 或者jq 来实现呢
可以使用jquery来实现,当然也就可以通过js来实现。
jquery的选择器完全是遵守w3c标准的,所以我写的css选择器你一样可以用jquery的选择器来选择目标元素。
不过,不理解为什么要通过脚本来实现?
extjs 的grid也可以设置border
表格
关键代码:
进测试 ,可行,jquery实现的