Using tables in Html is an indispensable part of web page production. If we directly set the td border in the table to 1 pixel in css, then the actual effect we see on the web page will be different. Not 1 pixel.
So how do we use css to make the table border 1 pixel?
In fact, it is very simple. Use the css style border-collapse: collapse;
This style means "set a merged border model for the table"
This attribute has been tested , support the browser:
I will write a case below
CSS
/*重点就是要在table上加border-collapse: collapse;这个样式,这个样式是合并边框模型的意思*/table{border-collapse: collapse;width:100%;}tr{}td{border: 1px solid #936943;height:40px;}
HTML
<table> <tr> <td></td> <td></td> </tr> <tr> <td></td> <td></td> </tr></table>