這篇文章主要介紹“html5 css3網(wǎng)站菜單實(shí)現(xiàn)代碼分享”,在日常操作中,相信很多人在html5 css3網(wǎng)站菜單實(shí)現(xiàn)代碼分享問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”html5 css3網(wǎng)站菜單實(shí)現(xiàn)代碼分享”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!
創(chuàng)新互聯(lián)專注于成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)、網(wǎng)站制作、網(wǎng)站開發(fā)。公司秉持“客戶至上,用心服務(wù)”的宗旨,從客戶的利益和觀點(diǎn)出發(fā),讓客戶在網(wǎng)絡(luò)營銷中找到自己的駐足之地。尊重和關(guān)懷每一位客戶,用嚴(yán)謹(jǐn)?shù)膽B(tài)度對待客戶,用專業(yè)的服務(wù)創(chuàng)造價(jià)值,成為客戶值得信賴的朋友,為客戶解除后顧之憂。
實(shí)現(xiàn)的難點(diǎn)在于:first-child,last-child 兩個選擇器,以后margin-left:-1px;的應(yīng)用,33%,34%寬度的技巧處理。
另外一個難點(diǎn)是:box-shadow:1px 0 0 #F1F1F1 inset; 的實(shí)現(xiàn)。
最后是:
代碼如下:
background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#b6b4b4));background:-moz-linear-gradient(top, #f9f9f9, #b6b4b4);background:-o-linear-gradient(top, #f9f9f9, #b6b4b4);background:linear-gradient(top, #f9f9f9, #b6b4b4);
代碼如下:
<!doctype html>
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>html5,css3菜單</title>
<style type="text/css">
.jikey_demo{ width:80%; margin:0 auto; background:#f1f1f1;}
.news_info{margin-bottom:5px;border:1px solid #bbb;border-radius:5px;box-shadow:0 1px 0 #f1f1f1;}
.news_info a{display:inline-block;width:33%;height:26px;font-family:"微軟雅黑";line-height:26px;text-align:center;color:#555;border-right:1px solid #ccc;box-shadow:1px 0 0 #F1F1F1 inset;}
.news_info a:first-child{width:33%;box-shadow:none;border-radius:4px 0 0 4px;}
.news_info a:last-child{width:34%;border-right:none;margin-left:-2px;border-radius:0 4px 4px 0;}
.news_info a:hover, .news_info a.current{color:#208edd;background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#b6b4b4));background:-moz-linear-gradient(top, #f9f9f9, #b6b4b4);background:-o-linear-gradient(top, #f9f9f9, #b6b4b4);background:linear-gradient(top, #f9f9f9, #b6b4b4);}
</style>
</head>
<body>
<div class="jikey_demo">
<nav class="news_info"><a class="current" href="/news/">新聞1</a><a class="" href="/guide/">新聞2</a><a class="" href="/review/">新聞3</a></nav>
</div>
</body>
</html>
到此,關(guān)于“html5 css3網(wǎng)站菜單實(shí)現(xiàn)代碼分享”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
網(wǎng)站名稱:html5css3網(wǎng)站菜單實(shí)現(xiàn)代碼分享
分享地址:http://jinyejixie.com/article4/joheoe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、商城網(wǎng)站、自適應(yīng)網(wǎng)站、網(wǎng)頁設(shè)計(jì)公司、、做網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)