CSS 参考手册
CSS * 选择器
选择<div>元素内的所有元素
源代码:
点击运行 »
<!DOCTYPE html> <html> <head> <style> div * { background-color: yellow; } </style> </head> <body> <h1>Welcome to My Homepage</h1> <div class="intro"> <p id="firstname">My name is Donald.</p> <p id="hometown">I live in Duckburg.</p> </div> <p>My best friend is Mickey.</p> </body> </html>
运行结果:
点击运行 »