求 css定义一个 6行5列的table,第一行为th红色边框,怎么说呢,类似于多个“田”字吧
一楼的到我这是乱码,感觉那个css设置太晦涩了,下面是这个图片,你懂的,主要是想学习一下用css设置表格边框之类的,下面这个没用css...
一楼的到我这是乱码,感觉那个css设置太晦涩了,下面是这个图片,你懂的,主要是想学习一下用css设置表格边框之类的,下面这个没用css
展开
2个回答
展开全部
简单表格.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;
}
2013-11-04
展开全部
<style type="text/css">
table { text-align:center; border-left:1px solid #000; border-top:1px solid #000;}
table tr td{ border-right:1px solid #000; border-bottom:1px solid #000; height:60px;}
.red{border-left:1px solid #F00; border-top:1px solid #F00; border-right:1px solid #F00; border-bottom:1px solid #F00;}
</style>
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="red">a</td>
<td class="red">b </td>
<td class="red">c</td>
<td class="red">d</td>
<td class="red">e</td>
</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>
table { text-align:center; border-left:1px solid #000; border-top:1px solid #000;}
table tr td{ border-right:1px solid #000; border-bottom:1px solid #000; height:60px;}
.red{border-left:1px solid #F00; border-top:1px solid #F00; border-right:1px solid #F00; border-bottom:1px solid #F00;}
</style>
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="red">a</td>
<td class="red">b </td>
<td class="red">c</td>
<td class="red">d</td>
<td class="red">e</td>
</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>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询