以下是css部分:

(注意表格中不要写高度,要不然会随着高度行距撑大!二是table中写上

border-collapse:collapse加上背景色;td中写出border的边框色,这样一个普通表格就写好了,这种写法是不是更简洁呢!

.timebox{width:174px;margin:0 auto;border-collapse:collapse;background:#eee}
.timebox td{padding:5px 15px;text-align:left;border:1px solid blue;}
以下是页面部分:
<table  class="timebox">  页面table头部这样写就可以了
                    <tr>
                        <td scope="col">剩余时间:</td>
                        <td rowspan="4" scope="col"><img src="images/time_26.png" width="42" height="60" /></td>
                    </tr>
                    <tr>
                        <td>1天</td>
                    </tr>
                    <tr>
                        <td>1小时</td>
                        </tr>
                    <tr>
                        <td>10分</td>
                    </tr>
     </table><!-- end  timebox -->

相关文章:

  • 2021-12-30
  • 2022-01-17
  • 2021-10-14
  • 2021-09-07
  • 2022-12-23
  • 2021-10-26
  • 2021-08-28
  • 2021-12-04
猜你喜欢
  • 2021-05-19
  • 2021-08-16
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
相关资源
相似解决方案