這是一個右側彈出的分類導航選單,滑鼠移入分類時,會顯示對應的細項。
<div class="my_left_category">
<h1>分類導航</h1>
<div class="h2_cat" onmouseover="this.className='h2_cat active_cat'" onmouseout="this.className='h2_cat'">
<h3><a href="#">企業建站</a></h3>
<div class="h3_cat">...</div>
</div>
</div>
使用背景圖做出標題、箭頭、分隔線與彈出陰影。以下保留主要圖片資源。
.my_left_category h1 {
background-image: url(https:///keleyi/phtml/rightmenu/top.gif);
background-repeat: no-repeat;
}
.my_left_category .h2_cat {
background-image: url(https:///keleyi/phtml/rightmenu/right.gif);
background-repeat: no-repeat;
}
.my_left_category .h2_cat_1 {
background-image: url(https:///keleyi/phtml/rightmenu/line.gif);
background-repeat: no-repeat;
}
.my_left_category .shadow {
background: url(https:///keleyi/phtml/rightmenu/back.gif) left top;
}
.my_left_category .shadow_border {
background: url(https:///keleyi/phtml/rightmenu/height.gif) no-repeat 0px 21px;
background-color: #ffffff;
}
.my_left_category .shadow_border ul li {
background-image: url(https:///keleyi/phtml/rightmenu/justright.gif);
background-repeat: no-repeat;
}
onmouseover 會加上 active_cat,讓目前分類顯示子選單;onmouseout 會移除,回到收合狀態。
此類選單適合桌面版大量分類。若用於手機,建議改為可折疊的響應式選單。