欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

如何做一个没有四边框线的表格_html/css_WEB-ITnose

程序员文章站 2022-05-11 15:36:40
...
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

br /> "http://www.w3.org/TR/html4/strict.dtd">


表格















关键代码:







进测试 ,可行,jquery实现的