Correction status:Uncorrected
Teacher's comments:
实例 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css</title> <style type="text/css"> div{ width: 300px; background-color: lightblue; } ul{ width: 200px; background-color: lightgreen; margin-top: 50px; padding-top:30px; } li{ list-style: none; width: 150px; background-color: red; padding: 3px 10px; } /*#first{ background-color: yellow; text-align: center; width: 50px; }*/ /*#second{ background-color: green; text-align: center; width: 70px; } .third{ font-size: 2em; text-align: right; background-color: white; } .last{ width: 70px; text-align: right; margin-left: 80px; */ } *[id]{ background-color: blue; } </style> </head> <body> <div> <ul> <li id="first">一楼</li> <li id="second">二楼</li> <li class="third">三楼</li> <li >四楼</li> <li class="third">五楼</li> <li class="last">六楼</li> </ul> </div> </body> </html> 运行实例 » 点击 "运行实例" 按钮查看在线实例