慕UI3307026
2018-10-03 15:45:23
請(qǐng)問(wèn)一下這兩種html加css的代碼寫法哪個(gè)好?或者說(shuō)哪個(gè)產(chǎn)生bug的可能性少一點(diǎn)第一種:<!DOCTYPE html><html><head><meta charset="UTF-8"><script src="E:\天貓前端\js\jquery\2.0.0\jquery.min.js"></script><link href="E:\天貓前端\css\bootstrap\3.3.6\bootstrap.min.css" rel="stylesheet"><script src="D:\天貓前端\js\bootstrap\3.3.6\bootstrap.min.js"></script><link rel="stylesheet" href="E:\天貓前端\navigation.css"></head><body><nav><a href=""><div class="left"><span class="glyphicon glyphicon-home red"></span>天貓首頁(yè)</div></a><span class="left">喵,歡迎來(lái)到天貓</span><a href=""><div class="left">請(qǐng)登錄</div></a><a href=""><div class="left">免費(fèi)注冊(cè)</div></a><a href=""><div class="right">我的訂單</div></a><a href=""><div class="right"><span ?class="glyphicon glyphicon-shopping-cart red"></span>購(gòu)物車<strong>0</strong>件</div></a></nav></body></html>*{ margin:0;}body{ font-size:12px; font-family:Arial;}a{ text-decoration:none; color:#999999;}nav{ width:100%; height:30px; background:#f2f2f2;}nav .left{ float:left; margin-left:20px; padding:6px 0;}nav .right{ float:right; margin-right:20px; padding:6px 0;}.red{ color:#c40000;}nav a:hover{ color:red; color:#c40000;}span{ color:#999999; margin-right:5px;}第二種:<!DOCTYPE html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script><link rel="stylesheet"><script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script></head>?<nav class="top ">? ? ? ? <a href="#nowhere">? ? ? ? ? ? <span class="glyphicon glyphicon-home redColor"></span>? ? ? ? ? ? 天貓首頁(yè)? ? ? ? </a>?? ? ? ? ? ?? ? ? ? <span>喵,歡迎來(lái)天貓</span>? ? ? ? ? ? <a href="#nowhere">請(qǐng)登錄</a>? ? ? ? ? ? <a href="#nowhere">免費(fèi)注冊(cè)</a>?? ? ?? ? ? ? <span class="pull-right">? ? ? ? ? ? <a href="#nowhere">我的訂單</a>? ? ? ? ? ? <a href="#nowhere">? ? ? ? ? ? <span class=" glyphicon glyphicon-shopping-cart redColor" ></span>? ? ? ? ? ? 購(gòu)物車<strong>0</strong>件</a> ? ? ??? ? ? ? </span>? ? ? ? ? ?</nav><style>body{????font-size: 12px;????font-family: Arial;}a{????color:#999;}.redColor{????color: #C40000 !important;}nav.top{????background-color: #f2f2f2;????padding-top: 5px;????padding-bottom: 5px;????border-bottom:1px solid? #e7e7e7;}nav.top span, nav.top a{????color: #999;????margin: 0px 10px 0px 10px;}nav.top a:hover{????color: #C40000;????text-decoration: none;}</style>
3 回答

- 3 回答
- 0 關(guān)注
- 1032 瀏覽
添加回答
舉報(bào)
0/150
提交
取消