企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
## :empty 选择器 ### 定义和用法 :empty选择器选择每个没有任何子级的元素,包括文本节点。 * * * ## 实例--指定空的p元素的背景色: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>W3Cschool教程(w3cschool.cn)</title> <style> p:empty { width:100px; height:20px; background:#ff0000; } </style> </head> <body> <p></p> <p>A paragraph.</p> <p>Another paragraph.</p> </body> </html> ```