html怎么将表格边框隐藏
时间:2022-02-23 17:34
html将表格边框隐藏的方法:1、使用style属性给table、th、td元素添加“border: none;”样式;2、使用style属性给table元素添加“border-color: transparent;”样式。 本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。 我们有下面一个表格: 怎么将这个表格的边框隐藏起来?下面介绍一下方法: 1、给table、th、td元素添加 2、给table元素添加 推荐教程:《html视频教程》 以上就是html怎么将表格边框隐藏的详细内容,更多请关注gxlsystem.com其它相关文章!<table border="1">
<tr>
<th>姓名</th>
<th>年龄</th>
</tr>
<tr>
<td>Peter</td>
<td>20</td>
</tr>
<tr>
<td>Lois</td>
<td>20</td>
</tr>
</table>
border: none;
样式<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<table border="1" style="border: none;">
<tr>
<th style="border: none;">姓名</th>
<th style="border: none;">年龄</th>
</tr>
<tr>
<td style="border: none;">Peter</td>
<td style="border: none;">20</td>
</tr>
<tr>
<td style="border: none;">Lois</td>
<td style="border: none;">20</td>
</tr>
</table>
</body>
</html>
border-color: transparent;
样式<table border="1" style="border-color: transparent;">
<tr>
<th>姓名</th>
<th>年龄</th>
</tr>
<tr>
<td>Peter</td>
<td>20</td>
</tr>
<tr>
<td>Lois</td>
<td>20</td>
</tr>
</table>