麻烦老师检查下有没语法错误,并且说下哪里可以优化简写的
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>display属性</title> <style type ="text/css"> body,div,h3,ul,li{padding:0;margin:0;} li{list-style:none;} h3{font-size:24px;font-family:宋体;padding:8px;} div{border:1px #e3e1e1 solid;} li{background-color:white;} ul{line-height:30px;} .big{text-align:center;background-color:#ececec;width:180px;margin:0px auto;} ul{display:none;} .div1:hover ul{display:block;} .div2:hover ul{display:block;} .div3:hover ul{display:block;} /*样式补充*/ </style> </head> <body> <div class="big"> <div class="div1"> <h3>家电</h3> <ul class="elec"> <li>冰箱</li> <li>洗衣机</li> <li>空调</li> </ul> </div> <div class="div2"> <h3>洗护</h3> <ul class="wash"> <li>洗衣液</li> <li>消毒液</li> <li>柔顺剂</li> </ul> </div> <div class="div3"> <h3>衣物</h3> <ul class="clothes"> <li>衬衫</li> <li>裤子</li> <li>卫衣</li> </ul> </div> </div> </body> </html>
0
收起
正在回答 回答被采纳积分+1
1回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星