:empty ---空的元素样式
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> :empty{background-color: red;} </style> </head> <body> <table border="1"> <tr> <td>内容1</td> <td>内容1</td> </tr> <tr> <td>sd</td> <td></td> </tr> </table> </body> </html>