一般用表格table的时候,喜欢这么定义边框,0为无,1为有。
<table border="1">
其后果就是……实在太丑了。直到看到另一个方法,给table定背景。先写table
<table border="0" cellpadding="1" cellspacing="1">
然后定css:
table{background:#ddd}
td{background:#fff}
是不是感觉清爽得多呢?如下图:
一般用表格table的时候,喜欢这么定义边框,0为无,1为有。
<table border="1">
其后果就是……实在太丑了。直到看到另一个方法,给table定背景。先写table
<table border="0" cellpadding="1" cellspacing="1">
然后定css:
table{background:#ddd}
td{background:#fff}
是不是感觉清爽得多呢?如下图: