基于CSS3實(shí)現(xiàn)的黑色個(gè)性導(dǎo)航菜單效果

本文實(shí)例講述了基于CSS3實(shí)現(xiàn)的黑色個(gè)性導(dǎo)航菜單效果。分享給大家供大家參考。具體如下:
黑色個(gè)性的CSS3導(dǎo)航菜單,豎直排列的菜單,基本原理與橫向的區(qū)別并不大,適合學(xué)習(xí)CSS。
運(yùn)行效果截圖如下:
在線演示地址如下:
http://demo.jb51.net/js/2015/css3-black-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>黑色菜單</title>
<style>
ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input{margin:0; padding:0;}
body { background: #1d1d1d; color: #fff; background-image:url("images/bg.png"); background-repeat:repeat-x; }
h1 { font: bold 65px/60px Helvetica, Arial, Sans-serif; text-align: center; color: #eee; text-shadow: 0px 2px 6px #333; }
h1 small{ font-size: 20px; text-transform:uppercase; letter-spacing: 14px; display: block; color: #ccc; }
h2 a { display: block; text-decoration: none; margin: 0 0 30px 0; font: italic 45px Georgia, Times, Serif; text-align: center; color: #bfe1f1; text-shadow: 0px 2px 6px #333; }
h2 a:hover { color: #90bcd0; }
h3 { font-style:italic; border-left:10px solid #eee; padding:10px 20px; margin:30px 0; color:#eee; }
h3 code { display:block; }
/* WRAPPER */
#wrapper { width:800px; margin:40px auto; }
/* LIST #1 */
#list1 { }
#list1 ul { list-style:none; text-align:center; border-top:1px solid #eee; border-bottom:1px solid #eee; padding:10px 0; }
#list1 ul li { display:inline; text-transform:uppercase; padding:0 10px; letter-spacing:10px; }
#list1 ul li a { text-decoration:none; color:#eee; }
#list1 ul li a:hover { text-decoration:underline; }
/* LIST #2 */
#list2 { width:320px; }
#list2 ol { font-style:italic; font-family:Georgia, Times, serif; font-size:24px; color:#bfe1f1; }
#list2 ol li { }
#list2 ol li p { padding:8px; font-style:normal; font-family:Arial; font-size:13px; color:#eee; border-left: 1px solid #999; }
#list2 ol li p em { display:block; }
/* LIST #3 */
#list3 { }
#list3 ul { list-style-image: url("images/arrow.png"); color:#eee; font-size:18px; }
#list3 ul li { line-height:30px; }
/* LIST #4 */
#list4 { width:320px; font-family:Georgia, Times, serif; font-size:15px; }
#list4 ul { list-style: none; }
#list4 ul li { }
#list4 ul li a { display:block; text-decoration:none; color:#000000; background-color:#FFFFFF; line-height:30px;
border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#CCCCCC; padding-left:10px; cursor:pointer; }
#list4 ul li a:hover { color:#FFFFFF; background-image:url(images/hover.png); background-repeat:repeat-x; }
#list4 ul li a strong { margin-right:10px; }
/* LIST #5 */
#list5 { color:#eee; }
#list5 ol { font-size:18px; }
#list5 ol li { }
#list5 ol li ol { list-style-image: url("images/nested.png"); padding:5px 0 5px 18px; font-size:15px; }
#list5 ol li ol li { color:#bfe1f1; height:15px; margin-left:10px; }
/* LIST #6 */
#list6 { font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; }
#list6 ol { list-style-type: upper-roman; color:#eee; font-size:14px; list-style-position: inside; }
#list6 ol li { }
/* LIST #7 */
#list7 { }
#list7 ul { color:#eee; font-size:18px; font-family:Georgia, Times, serif; }
#list7 ul li { display: inline; }
#list7 ul li:after { content: ", "; }
#list7 ul li.last:after { content: ". "; }
/* LIST #8 */
#list8 { }
#list8 ul { list-style:none; }
#list8 ul li { font-family:Georgia,serif,Times; font-size:18px; }
#list8 ul li a { display:block; width:300px; height:28px; background-color:#333; border-left:5px solid #222; border-right:5px solid #222; padding-left:10px;
text-decoration:none; color:#bfe1f1; }
#list8 ul li a:hover { -moz-transform:rotate(-5deg); -moz-box-shadow:10px 10px 20px #000000;
-webkit-transform:rotate(-5deg); -webkit-box-shadow:10px 10px 20px #000000;
transform:rotate(-5deg); box-shadow:10px 10px 20px #000000; }
</style>
</head>
<body>
<div id="wrapper">
<h1>Styling your lists<small>using only CSS</small></h1>
<h2><a href="http://www.dbjr.com.cn/" title="Visit More Codes">腳本之家</a></h2>
<div id="list8">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
</body>
</html>
希望本文所述對(duì)大家CSS3網(wǎng)頁(yè)設(shè)計(jì)有所幫助。
相關(guān)文章
基于css3的屬性transition制作菜單導(dǎo)航效果
這篇文章主要為大家介紹了基于css3的屬性transition制作菜單導(dǎo)航效果,可實(shí)現(xiàn)鼠標(biāo)滑過(guò)菜單項(xiàng)動(dòng)態(tài)改變背景滑塊的功能,基于css3的屬性transition實(shí)現(xiàn),非常具有實(shí)用價(jià)值,需要的2015-09-01CSS3實(shí)現(xiàn)銀灰色動(dòng)畫效果的導(dǎo)航菜單代碼
這篇文章主要為大家介紹了CSS3實(shí)現(xiàn)銀灰色動(dòng)畫效果的導(dǎo)航菜單代碼,采用純css3技術(shù)實(shí)現(xiàn)的導(dǎo)航效果,鼠標(biāo)滑過(guò)有背景變換的功能,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-09-01css3實(shí)現(xiàn)的多級(jí)漸變下拉菜單導(dǎo)航效果代碼
這篇文章主要為大家介紹了css3實(shí)現(xiàn)的多級(jí)漸變下拉菜單導(dǎo)航效果代碼,通過(guò)純css3技術(shù)實(shí)現(xiàn)圓角圖形及漸變按鈕的模擬效果,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-08-31- 這篇文章主要介紹了使用CSS3制作響應(yīng)式導(dǎo)航菜單的方法,這種菜單在移動(dòng)端的網(wǎng)頁(yè)制作中也經(jīng)常能夠用到,需要的朋友可以參考下2015-07-12
純CSS3實(shí)現(xiàn)的華麗網(wǎng)站下拉菜單導(dǎo)航特效源碼
是一段實(shí)現(xiàn)了鼠標(biāo)放在導(dǎo)航時(shí),該導(dǎo)航會(huì)下拉出相應(yīng)內(nèi)容的二級(jí)菜單的效果代碼,本段代碼適應(yīng)于所有網(wǎng)頁(yè)使用,有興趣的朋友們可以前來(lái)下載使用2015-03-12純CSS3實(shí)現(xiàn)的圓形擁有二級(jí)菜單的菜單導(dǎo)航特效源碼
是一款在圓形的左側(cè)顯示一級(jí)菜單導(dǎo)航,當(dāng)鼠標(biāo)懸浮在一個(gè)標(biāo)題上時(shí),在圓形的右側(cè)就會(huì)顯示出相關(guān)的二級(jí)導(dǎo)航菜單效果代碼,此段代碼是不是很有趣?本段代碼適應(yīng)于所有網(wǎng)頁(yè)使用2014-12-24一款純css3實(shí)現(xiàn)的豎形二級(jí)導(dǎo)航的實(shí)例教程
這篇文章主要為大家介紹了一款純css3實(shí)現(xiàn)的豎形二級(jí)導(dǎo)航的實(shí)例教程,這款導(dǎo)航菜單特色是可以是無(wú)限級(jí)。下面有代碼,不會(huì)的朋友可以過(guò)來(lái)借鑒學(xué)習(xí)哦2014-12-11純css3實(shí)現(xiàn)的螺旋狀動(dòng)態(tài)旋轉(zhuǎn)導(dǎo)航下拉菜單效果源碼
css3實(shí)現(xiàn)的導(dǎo)航菜單代碼不需要額外的js實(shí)現(xiàn)的動(dòng)態(tài)效果2014-11-26CSS3實(shí)現(xiàn)的扁平化面包屑菜單導(dǎo)航源碼
面包屑菜單一般貫穿整個(gè)網(wǎng)站,可以很清晰地描述訪客的當(dāng)前層級(jí)目錄,讓用戶更清楚地了解網(wǎng)站各個(gè)頻道之間的關(guān)系。這款CSS3面包屑菜單十分精巧,它采用了扁平化設(shè)計(jì),讓菜單2014-10-24