abstract:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>淘寶網(wǎng)站導(dǎo)航</title> <link rel="stylesheet" href="nav1.
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>淘寶網(wǎng)站導(dǎo)航</title> <link rel="stylesheet" href="nav1.css" /> </head> <body> <div class="header"> <div class="header_content"> <div class="content_left"> <a href=""class="header_a">中國大陸</a> <a href=""style="color: coral; text-decoration: none;">親,請(qǐng)登錄</a> <a href=""class="header_a">免費(fèi)注冊(cè)</a> <a href=""class="header_a">手機(jī)逛淘寶</a> </div> <div class="content_right"> <a href=""class="header_a">我的淘寶 <ul> <li>已買到的寶貝</li> <li>我的足跡</li> </ul> </a> <a href=""class="">購物車</a> <a href=""class="header_a">收藏夾</a> <a href=""class="header_a">商品分類</a> <a href=""class="header_a">賣家中心</a> <a href=""class="header_a">聯(lián)系客服</a> <a href=""class="header_a">網(wǎng)站導(dǎo)航</a> </div> </div> </div> </body> </html> * { margin: 0px; padding: 0px; } .header { width: 100%; height: 40px; background-color: #CCCCCC; } .header_content { width: 900px; height: 40px; line-height: 40px; margin: 0 auto; } .content_left { height: 40px; float: left; } .content_right { width: 500px; height: 40px; float: right; letter-spacing: 2px; } a { text-decoration: none; font-size: 13px; } .header_a { display: inline-block; color: black; position: relative; height: 40px; text-align: center; } .header_a:hover { background-color: darkgreen; } li{ list-style: none; } .header_a ul{ border: 1px; display: none; margin-top: none; } .header_a:hover ul{ display: block; position: absolute; width: 100px; } .header_a ul li:hover{ background-color: #CCCCCC; } .header_a ul li{ color: #000000; height: 30px; text-align: left; padding: 0px 3px; margin: 5px 0px; }
Correcting teacher:天蓬老師Correction time:2019-04-28 08:46:22
Teacher's summary:class="header_a,
css中, 推薦使用連接線"-",而不是下劃線, 遵循行業(yè)規(guī)范, 會(huì)給你帶來很多方便的