CSS怎么使用圖片美化菜單效果-創(chuàng)新互聯(lián)

這篇文章主要講解了“CSS怎么使用圖片美化菜單效果”,文中的講解內(nèi)容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“CSS怎么使用圖片美化菜單效果”吧!

創(chuàng)新互聯(lián)建站專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務,包含不限于成都做網(wǎng)站、網(wǎng)站設計、莊浪網(wǎng)絡推廣、小程序開發(fā)、莊浪網(wǎng)絡營銷、莊浪企業(yè)策劃、莊浪品牌公關、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務,您的肯定,是我們大的嘉獎;創(chuàng)新互聯(lián)建站為所有大學生創(chuàng)業(yè)者提供莊浪建站搭建服務,24小時服務熱線:18980820575,官方網(wǎng)址:muchs.cn

本文實例講述了CSS使用圖片美化的漂亮菜單效果。分享給大家供大家參考。具體如下:

這里介紹的這個菜單很漂亮,因為每個菜單項都是調(diào)用的圖片,感覺這個菜單有點華而不實,畢竟菜單太多會影響網(wǎng)頁加載,一個菜單也沒有必要為了好看而犧牲太多,根據(jù)你的需要使用哦。

運行效果截圖如下:

CSS怎么使用圖片美化菜單效果

在線演示地址如下:

http://demo.jb51.net/js/2015/css-pic-cha-style-menu-demo/

具體代碼如下:

代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用圖片美化的CSS菜單</title>
<style>
body{background:#fff url(images/bkg_page.png);background-repeat:repeat-x;padding:0;margin:0;font-family:'Verdana';font-size:12px;color:#7f8991}
#header{margin:108px 0 0 100px}
#header em{display:none}
#header ul{width:100%;float:left;padding:0;margin:0;list-style-type:none}
#header li{float:left;padding:0;margin:0;display:inline}
#header li a{display:block;height:46px}
#header li a.home{background:url(images/menu_01.png) no-repeat left top;width:52px}
#header li a.homeActive{background:url(images/menu_01.png) no-repeat left bottom;width:52px}
#header li a.gallery{background:url(images/menu_02.png) no-repeat left top;width:60px}
#header li a.galleryActive{background:url(images/menu_02.png) no-repeat left bottom;width:60px}
#header li a.resources{background:url(images/menu_03.png) no-repeat left top;width:76px;margin:0;padding:0}
#header li a.resourcesActive{background:url(images/menu_03.png) no-repeat left bottom;width:76px}
#header li a.submit{background:url(images/menu_04.png) no-repeat left top;width:97px}
#header li a.submitActive{background:url(images/menu_04.png) no-repeat left bottom;width:97px}
#header li a.feed{background:url(images/menu_05.png) no-repeat left top;width:68px}
#header li a.feedActive{background:url(images/menu_05.png) no-repeat left bottom;width:68px}
#header li a.about{background:url(images/menu_06.png) no-repeat left top;width:52px}
#header li a.aboutActive{background:url(images/menu_06.png) no-repeat left bottom;width:52px}
#header li a.blog{background:url(images/menu_10.png) no-repeat left top;width:51px}
#header li a.blogActive{background:url(images/menu_10.png) no-repeat left bottom;width:51px}
#header li a.contact{background:url(images/menu_07.png) no-repeat left top;width:64px}
#header li a.contactActive{background:url(images/menu_07.png) no-repeat left bottom;width:64px}
#header li a:hover{background-position:left bottom}
</style>
</head>
<body>
<div id="header">
 <ul>
   <li><a class="homeActive" href="#"><em>home</em></a></li>
   <li><a class="gallery" href="#"><em>gallery entries</em></a></li>
   <li><a class="resources" href="#"><em>resources</em></a></li>
   <li><a class="submit" href="#"><em>submit a site</em></a></li>
   <li><a class="feed" href="#"><em>our feed</em></a></li>
   <li><a class="blog" href="#"><em>blog</em></a></li>
   <li><a class="about" href="#"><em>about</em></a></li>
   <li><a class="contact" href="#"><em>contact</em></a></li>
 </ul>
</div>
</body>
</html>

希望本文所述對大家的css網(wǎng)頁設計有所幫助。

感謝各位的閱讀,以上就是“CSS怎么使用圖片美化菜單效果”的內(nèi)容了,經(jīng)過本文的學習后,相信大家對CSS怎么使用圖片美化菜單效果這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是創(chuàng)新互聯(lián)網(wǎng)站建設公司,,小編將為大家推送更多相關知識點的文章,歡迎關注!

文章題目:CSS怎么使用圖片美化菜單效果-創(chuàng)新互聯(lián)
分享地址:http://muchs.cn/article22/deicjc.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供微信公眾號、域名注冊、面包屑導航、網(wǎng)站改版、品牌網(wǎng)站建設網(wǎng)頁設計公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應式網(wǎng)站建設