這篇文章主要介紹“CSS怎么實(shí)現(xiàn)菱形導(dǎo)航菜單效果代碼”,在日常操作中,相信很多人在CSS怎么實(shí)現(xiàn)菱形導(dǎo)航菜單效果代碼問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”CSS怎么實(shí)現(xiàn)菱形導(dǎo)航菜單效果代碼”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
創(chuàng)新互聯(lián)建站是專業(yè)的樊城網(wǎng)站建設(shè)公司,樊城接單;提供網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè),網(wǎng)頁(yè)設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行樊城網(wǎng)站開發(fā)網(wǎng)頁(yè)制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來(lái)合作!本文實(shí)例講述了純CSS實(shí)現(xiàn)的菱形導(dǎo)航菜單效果代碼。分享給大家供大家參考。具體如下:
這是一款兼容各種瀏覽器的菱形導(dǎo)航菜單,采用純CSS代碼實(shí)現(xiàn),一改平時(shí)矩形風(fēng)格的菜單,讓人眼前一亮,形式新穎,鼠標(biāo)滑過(guò)時(shí)變色,而且在各大瀏覽器下表現(xiàn)不俗。
運(yùn)行效果截圖如下:
在線演示地址如下:
http://demo.jb51.net/js/2015/css-Diamond-nav-menu-style-codes/
具體代碼如下:
代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>菱形導(dǎo)航菜單</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
ul,li,a,span{margin:0;padding:0;list-style:outside none;height:25px;line-height:25px;display:block;}
ul{padding-left:25px;}
ul li{float:left;display:inline;margin-right:26px;}
ul li a,ul li a span{background:url(images/navBg.png) -25px 0 no-repeat;}
ul li a{padding:0 25px;font-size:12px;color:#FFF;position:relative;float:left;text-align:center;}
ul li a span{position:absolute;top:0;width:25px;}
ul li a .al{left:-25px;background-position:left 0;}
ul li a .ar{right:-25px;background-position:right 0;}
ul li a:hover{background-position:-25px -25px;}
ul li a:hover .al{background-position:left -25px;}
ul li a:hover .ar{background-position:right -25px;}
ul li a:active,ul li.current a{background-position:-25px -50px;}
ul li a:active .al,ul li.current a .al{background-position:left -50px;}
ul li a:active .ar,ul li.current a .ar{background-position:right -50px;}
</style>
</head>
<body>
<ul>
<li><a href="javascript:void(0)"><span class="al"></span>首頁(yè)<span class="ar"></span></a></li>
<li><a href="javascript:void(0)"><span class="al"></span>關(guān)于我們<span class="ar"></span></a></li>
<li><a href="javascript:void(0)"><span class="al"></span>公司新聞<span class="ar"></span></a></li>
<li><a href="javascript:void(0)"><span class="al"></span>網(wǎng)上商城<span class="ar"></span></a></li>
</ul>
</body>
</html>
希望本文所述對(duì)大家的div+css程序設(shè)計(jì)有所幫助。
到此,關(guān)于“CSS怎么實(shí)現(xiàn)菱形導(dǎo)航菜單效果代碼”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
網(wǎng)頁(yè)標(biāo)題:CSS怎么實(shí)現(xiàn)菱形導(dǎo)航菜單效果代碼-創(chuàng)新互聯(lián)
分享鏈接:http://chinadenli.net/article14/cdhdde.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)網(wǎng)站建設(shè)、外貿(mào)建站、品牌網(wǎng)站制作、網(wǎng)站設(shè)計(jì)公司、網(wǎng)頁(yè)設(shè)計(jì)公司、商城網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容