* { padding:0; margin:0; border:0; } .box,.box2 { width:500px; margin:20px auto; } .tab-menus,.tab-menus2 { line-height:40px; overflow:hidden; border-bottom:1px solid #ccc; margin-bottom:10px; } .tab-menus li,.tab-menus2 li { list-style:none; cursor:pointer; float:left; width:100px; color:#0C0C0C; font-size:14px; text-align:center; } .tab-menus li.cur,.tab-menus2 li.cur2 { color:red; } .tab-content,.tab-content2 { padding:20px 10px; border:1px solid #ccc; } .tab-content div,.tab-content2 div { display:none; } .tab-content div.block,.tab-content2 div.block2 { display:block; }
鼠标滑过直接改click改成hover就可以