纯CSS打造淘宝导航菜单栏
店铺装修-PC端-基础页-首页-装修页面:编辑“菜单”模块-显示设置,粘贴如下CSS:
/* 导航条背景色*/ .skin-box-bd .menu-list{background: none repeat scroll 0 0 #3F7FCE;} /*首页/店铺动态背景色*/ .skin-box-bd .menu-list .link{ background: none repeat scroll 0 0 #3F7FCE; color: #C2D5ED; font-family: 微软雅黑,黑体; font-weight: bold; font-size: small;} /*首页/店铺动态右边线*/ .skin-box-bd .menu-list .menu{ border-width: 0 1px 0 0; border-color: #3871B7; border-style: solid; background: #3F7FCE; font-size: 14px;} .skin-box-bd .menu-list .menu-hover .link{background: none repeat scroll 0 0 #3487ed;} /*首页/店铺动态文字颜色*/ .skin-box-bd .menu-list .menu .link .title{color:#fff} .skin-box-bd .menu-list .menu-selected .link .title{background: none repeat scroll 0 0 #3F7FCE;} .skin-box-bd .menu-list .menu-hover .link .title{background: none repeat scroll 0 0 #3487ed;} /*下拉菜单图标*/ .skin-box-bd .menu-list .menu .link .popup-icon{ height: 12px; width: 12px; background: url(//gdp.alicdn.com/tps/i1/T18WsRFcpdXXXPXsT8-51-381.gif) -14px -179px no-repeat; } .skin-box-bd .menu-list .menu-hover .link .popup-icon{ height: 12px; width: 12px; background: url(//gdp.alicdn.com/tps/i1/T18WsRFcpdXXXPXsT8-51-381.gif) -14px -199px no-repeat; } /*二级菜单*/ .menu-popup-cats .sub-cat{background: none repeat scroll 0 0 #2c5990;} .menu-popup-cats .sub-cat-hover{background: none repeat scroll 0 0 #3487ed;color: #FFF;} .menu-popup-cats li.sub-cat-hover::before{content: '%3e';} /*所有分类背景色*/ .skin-box-bd .all-cats .link{background: none repeat scroll 0 0 #ff4400;padding: 0 15px;} /*所有分类文字颜色*/ .skin-box-bd .all-cats .title{ color: #f5f5f5; font-family: 微软雅黑,黑体; font-weight: bold; font-size: small; } /*所有分类-下拉菜单图标*/ .skin-box-bd .all-cats .link .popup-icon { height: 12px; width: 12px; background: url(//gdp.alicdn.com/tps/i1/T18WsRFcpdXXXPXsT8-51-381.gif) 0 -220px no-repeat; } .skin-box-bd .all-cats-hover .link .popup-icon { height: 12px; width: 12px; background: url(//gdp.alicdn.com/tps/i1/T18WsRFcpdXXXPXsT8-51-381.gif) 0 -240px no-repeat; } /*所有分类-二级菜单*/ .skin-box-bd .popup-content .cats-tree .fst-cat{background: none repeat scroll 0 0 #2c5990;} .skin-box-bd .popup-content .cats-tree .cat-hd-hover{background: none repeat scroll 0 0 #3487ed;color: #FFF;} /*所有分类-三级菜单*/ .skin-box-bd .popup-content .cats-tree .fst-cat .snd-pop .snd-cat-hd a{ background: none repeat scroll 0 0 #2c5990;color: #C2D5ED; } .skin-box-bd .popup-content .cats-tree .fst-cat .snd-pop .snd-cat-hd-hover a{background: none repeat scroll 0 0 #3487ed;color: #FFF;}
自定义导航示例:https://hotshop.bbs.taobao.com/detail.html?postId=7000589
进入CSS导航在线生成工具页面(http://taobaokaidian.com/tool/dhcss/ 如果不能点击打开,请复制网址到时浏览器中打开),
想了解更多样式,可以来这里学习css : http://www.w3cschool.cn/css_intro.html