admin管理员组

文章数量:1316974

html中table整体缩小,html

您可以使用border-collapse:在表格中折叠.

The border-collapse CSS property selects a table’s border model. This

has a big influence on the look and style of the table cells.

The separated model is the traditional HTML table border model.

Adjacent cells each have their own distinct borders. The distance

between them given by the border-spacing property.

In the collapsed border model, adjacent table cells share borders. In

that model, the border-style value of inset behaves like groove, and

outset behaves like ridge.

没有边框折叠的示例:

tr.alternate {

background-color: #aaa;

}

testtesttest
testtesttest

边界折叠示例:

table {

border-collapse: collapse;

}

tr.alternate {

background-color: #aaa;

}

testtesttest
testtesttest

如您所见,您不需要为td设置单独的类.

本文标签: html中table整体缩小HTML