標籤: head title href utf-8 bsp text int doctype
再來寫一個菜單側邊欄的製作,先看
原始碼如下
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> * { margin: 0; padding: 0; } body { font-family: "微軟雅黑"; font-size: 14px; } a { text-decoration: none; } .sliderBar { position: fixed; left: 20px; top: 35%; } .sliderBar .ftName { position: relative; } .sliderBar dl dd { position: relative; width: 80px; height: 80px; background-color: #646577; border-bottom: 1px solid #999; text-align: center; background-repeat: no-repeat; background-position: center 20%; cursor: pointer; } .sliderBar dd span { color: #fff; width: 80px; height: 80px; line-height: 80px; display: block; } .sliderInfo { position: absolute; left: 90px; top: 0; width: 250px; background-color: #646577; padding: 0 10px; color: #FFFFFF; text-align: left; display: none; } .ftName:hover > a > span { background-color: coral; } .ftName:hover > .sliderInfo { display: block; } </style> </head> <body> <div class="sliderBar"> <dl> <dd class="ftName"> <a href="#"> <span>包裹查詢</span> </a> <div class="sliderInfo"> <p>批量查詢跨境包裹物流派送資訊,支援郵政、DHL、UPS、EMS、FedEX等服務</p> </div> </dd> <dd class="ftName"> <a href="#"> <span>進口個人<br>額度查詢</span> </a> <div class="sliderInfo"> <p>查詢通過進口跨境電商渠道購買,已用額度</p> </div> </dd> <dd class="ftName"> <a href="#"> <span>快郵線上</span> </a> <div class="sliderInfo"> <p>快郵線上物流綜合服務平台為電商及外貿企業提供物流、通關、金融等服務</p> </div> </dd> </dl> </div> </body></html>
[劉陽Java]_CSS菜單側邊欄製作