本文介绍了tbody边框不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么边框在下面的tbody周围不显示?我试过规则=组,边框出现,但只有两个tbody部分之间,它被折叠。

Why doesn't the border show around tbody in the following? I tried rules="groups" and the border appears, but only between the two tbody sections and it is collapsed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset="UTF-8"> 
    <title>Test</title>
    <style type="text/css">
      table.sectioned tbody {
        border: 2px solid black;
        border-collapse: separate;
        border-spacing: 4px; }
    </style>
  </head>
  <body>
    <table class="sectioned">
      <tbody>
        <tr><td colspan="2"><b>General Data</b></td></tr>
        <tr><td>Tail Number</td><td>N0809021</td></tr>
        <tr><td>Type of Ownership</td><td>personal</td></tr>
        <tr><td>Type of Aircraft</td><td>aircraft under 13,000 pounds</td></tr>
        <tr><td>Year of Manufacture</td><td>1999</td></tr>
        <tr><td>Use of Aircraft</td><td>private</td></tr>
        <tr><td>Start Date</td><td></td></tr>
        <tr><td>Policy Length</td><td>6 months</td></tr>
      </tbody>
      <tbody>
        <tr><td colspan="2"><b>Additional Aircraft Information</b></td></tr>
        <tr><td>Manufacturer</td><td></td></tr>
        <tr><td>Model</td><td></td></tr>
        <tr><td>Engine Make</td><td></td></tr>
        <tr><td>Number of Seats</td><td></td></tr>
      </tbody>
    </table>
  </body>
</html>


推荐答案

尝试此

tbody{
    display:block;
    border: 2px solid black;
    border-collapse: separate;
    border-spacing: 4px; 
}

您可以在此

这篇关于tbody边框不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 13:14