源代码:
下载代码
AI 编程工具
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> <style> li:last-child { background-color: #ff0000; } </style> </head> <body> <ul> <li>此元素背景色不是红色。</li> <li>我的也不是红色。</li> <li>我的才是红色。</li> </ul> </body> </html>
运行结果: