溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

怎么用css實(shí)現(xiàn)藍(lán)色圓角效果水平導(dǎo)航菜單

發(fā)布時間:2021-08-04 20:39:46 來源:億速云 閱讀:136 作者:chen 欄目:web開發(fā)

本篇內(nèi)容主要講解“怎么用css實(shí)現(xiàn)藍(lán)色圓角效果水平導(dǎo)航菜單”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“怎么用css實(shí)現(xiàn)藍(lán)色圓角效果水平導(dǎo)航菜單”吧!

這是一款可愛的藍(lán)色圓角水平導(dǎo)航菜單,用到幾張背景圖片,我覺得這款菜單挺實(shí)用,特別是用在個人博客中非常合適。在兼容性方面做的也很好,幾乎兼容所有的瀏覽器。

運(yùn)行效果截圖如下:

怎么用css實(shí)現(xiàn)藍(lán)色圓角效果水平導(dǎo)航菜單

在線演示地址如下:

http://demo.jb51.net/js/2015/css-blue-cicle-style-nav-menu-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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>藍(lán)色圓角水平導(dǎo)航菜單</title>
<style>
*{
 margin:0;
 padding:0;
}
body{
 background:#fff;
 color:#666;
 font:12px/18px Tahoma, Arial, Helvetica, sans-serif;
}
#menu{
 width:100%;
 margin:15px;
}
#menu ul{
 list-style:none;
}
#menu li{
 list-style:none;
 display:block;
 float:left;
 margin:0 2px;
}
#menu li a{
 display:block;
 float:left;
 height:66px;
 color:#fff;
 text-transform:uppercase;
 font-size:11px;
 font-weight:bold;
 background:url(images/menu_009_l.jpg) no-repeat left;
 line-height:66px;
 padding:0 0 0 9px;
 text-decoration:none;
}
#menu li a span{
 display:block;
 float:left;
 background:url(images/menu_009_r.jpg) no-repeat right;
 height:66px;
 color:#d2eeff;
 line-height:66px;
 padding:0 18px 0 8px;
}
#menu li a:hover{
 display:block;
 float:left;
 background:url(images/menu_009_h_l.jpg) no-repeat left;
 height:66px;
}
#menu li a:hover span{
 display:block;
 float:left;
 background:url(images/menu_009_h_r.jpg) no-repeat right;
 color:#fff;
 height:66px;
}
#menu li a.current{
 display:block;
 float:left;
 height:66px;
 color:#fff;
 text-transform:uppercase;
 font-size:11px;
 font-weight:bold;
 background:url(images/menu_009_h_l.jpg) no-repeat left;
 line-height:66px;
 padding:0 0 0 9px;
 text-decoration:none;
}
#menu li a.current span{
 display:block;
 float:left;
 background:url(images/menu_009_h_r.jpg) no-repeat right;
 height:66px;
 color:#fff;
 line-height:66px;
 padding:0 18px 0 8px;
}
</style>
</head>
<body>
<div id="menu">
 <ul>
   <li><a href="#" class="current"><span>首頁</span></a></li>
   <li><a href="#"><span>精品腳本下載</span></a></li>
   <li><a href="#"><span>網(wǎng)頁模板</span></a></li>
 </ul>
</div>
</body>
</html>

到此,相信大家對“怎么用css實(shí)現(xiàn)藍(lán)色圓角效果水平導(dǎo)航菜單”有了更深的了解,不妨來實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

css
AI