空单元格的边框

如果在一个表格含有空单元格,那么你可以使用empty-cells属性来指定是否显示空单元格的边框

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style type="text/css">
			td {
				border: 1px solid #0088dd;
				padding: 15px;}
			table.one {
				empty-cells: show;}
			table.two {
				empty-cells: hide;}
		</style>
	</head>
	<body>
		<table class="one">
			<tr>
				<td>1</td>
				<td>2</td>
			</tr>
			<tr>
				<td>3</td>
				<td></td>
			</tr>
		</table>
		<table class="two">
			<tr>
				<td>1</td>
				<td>2</td>
			</tr>
			<tr>
				<td>3</td>
				<td></td>
			</tr>
    </table>
    </body>
</html>
原文地址:https://www.cnblogs.com/q2546/p/9444161.html