<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>内联块状元素</title> <style type="text/css"> div,p,h1,form,ul,li{background:pink;} </style> </head> <body> <div>div1</div> <div>div2</div> <p>段落1段落1段落1段落1段落1</p> <h1>你好</h1> <form method="get" action="name.php"> <p>姓名:<input type="text" name="you name" placeholder="请输入姓名"></p> <input type="submit" name="submit"> </form> <ul> <li>123</li> <li>li</li> </ul> <ol> <li>sdfak</li> <li>sldkfjl</li> </ol> </body> </html>
div,p,h1,form,ul,li{background:pink;}
这里缺了ol,加上就可以了
呵呵呵呵