2-4 编程练习作业提交
来源:2-41 编程练习
MiMicccc
2020-09-07 14:52:09
<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> div{ width: 200px; height:150px; background-color: #eee; margin-top: 5px; } section{ width: 200px; height: 30px; margin-bottom: 5px; background-color: #ff0; } /*此处写代码*/ div:empty { background: red; } div>section:empty { background: #abcdef; } </style> </head> <body> <div> <section>one</section> <section>two</section> </div> <div></div> <div> <section>three</section> <section>four</section> <section>five</section> <section></section> </div> </body> </html>
1回答
同学你好,效果实现正确,继续加油,祝学习愉快~
相似问题