作业帮 > 综合 > 作业

求 css定义一个 6行5列的table,第一行为th红色边框,怎么说呢,类似于多个“田”字吧

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/08 13:45:17
求 css定义一个 6行5列的table,第一行为th红色边框,怎么说呢,类似于多个“田”字吧
一楼的到我这是乱码,感觉那个css设置太晦涩了,下面是这个图片,你懂的,主要是想学习一下用css设置表格边框之类的,下面这个没用css
简单表格.html  文件代码清单如下:<!doctype html>
<html lang="zh">
    <head>
        <meta charset="utf-8" />
        <title>简单表格</title>
        <link rel="stylesheet" href="table.css" />
    </head>

    <body>
        <table>
          <caption>
            create your own bingo card
          </caption>
          <tr>
            <th>b</th>
            <th>i</th>
            <th>n</th>
            <th>g</th>
            <th>o</th>
          </tr>

          <tr>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
            <td>5</td>
          </tr>
          
          <tr>
            <td>6</td>
            <td>7</td>
            <td>8</td>
            <td>9</td>
            <td>10</td>
          </tr>

          <tr>
            <td>11</td>
            <td>12</td>
            <td>13</td>
            <td>14</td>
            <td>15</td>
          </tr>

          <tr>
            <td>16</td>
            <td>17</td>
            <td>18</td>
            <td>19</td>
            <td>20</td>
          </tr>

          <tr>
            <td>21</td>
            <td>22</td>
            <td>23</td>
            <td>24</td>
            <td>25</td>
          </tr>
      </table>
    </body>
</html>table.css   文件代码清单如下:table {
border: none;
border-collapse: collapse;
}
table caption {
font-size: 1.2em;
font-weight: bold;
}
table th {
border: 1px solid red;
width: 100px;
height: 100px;
}
table td {
border: 1px solid #000;
width: 100px;
height: 100px;
}