純CSS打造淘寶導航選單欄

熊仔其人發表於2018-06-06

店鋪裝修-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

 

相關文章