效果图:核心代码: 复制代码 代码如下: 王牌栏目 Regular features 世界最美哇!好玩穷游世界周末驾到 少女傲人双峰自拍 日本酥胸美女杉原杏 性感美女黑色内衣 绝美性感黑丝美眉 <BR>jQuery(function (j) { <BR>var r = j('#regular_features'), <BR>btns = r.find('> div.tabs > a'), <BR>el_ani = r.find('> ul'), <BR>el_pages = el_ani.find('> li'), <BR>pages = el_pages.length, <BR>p = 0, <BR>pw = 219; <BR>btns.each(function (idx, btn) { <BR>btn = j(btn); <BR>btn.mouseenter(function (ev) { <BR>if (idx != p) { <BR>j(btns[p]).removeClass('on'); <BR>btn.addClass('on'); <BR>p = idx; <BR>el_ani.stop().animate({ top: -pw * idx }, 300); <BR>} <BR>return false; <BR>}); <BR>}).eq(1).mouseenter(); <BR>}); <BR> 演示代码: /* 全局CSS定义 */ div,form,ul,ol,li,span,p,dl,dt,dd,img{margin:0;padding:0;border:0;} h1,h2,h3,h4,h5,h6{margin:0;padding:0;font-size:12px;font-weight:normal;} ul,ol,li{list-style:none} table,td,input,textarea{font-size:12px} .blockB{margin-bottom:22px;margin-right:11px;padding-bottom:22px;border-bottom:1px solid #e8eee0; background:url(/upload/201107/20110709230423180.gif) no-repeat 0 99px;} .blockB .pp{ margin-left:51px; height:223px; position:relative; top:0; overflow:hidden; width:248px; } .blockB .tabs{float:left;width:68px;font-size:14px;font-weight:700;line-height:16px;} .blockB .tabs a{width:38px;padding:5px 24px 0 6px;height:36px;display:block;color:#fff; margin-bottom:12px;background:#639805 url(/upload/201107/20110709230423555.gif) no-repeat 0 -45px; text-decoration:none;} .blockB .tabs a.on{background-position:0 0;background-color:#ff8c10;cursor:default;} .blockB ul{ width:130px; float:left; position:relative; top:0; } .blockB li{ padding:4px; background:#639805; height:211px; overflow:hidden; width:120px; } .blockB li a{color:#fff;} .blockB li span {display:block;padding-top:5px;height:15px;font-size:12px;text-align:center} h2 { height: 35px; line-height: 33px; margin-bottom: 5px; text-align: right; } h2 span {display: none;float: left;font-weight: bold;} .pp img {display: block;margin: 0 auto;} 王牌栏目 Regular features 世界最美哇!好玩穷游世界周末驾到 少女傲人双峰自拍 日本酥胸美女杉原杏 性感美女黑色内衣 绝美性感黑丝美眉 jQuery(function (j) { var r = j('#regular_features'), btns = r.find('> div.tabs > a'), el_ani = r.find('> ul'), el_pages = el_ani.find('> li'), pages = el_pages.length, p = 0, pw = 219; btns.each(function (idx, btn) { btn = j(btn); btn.mouseenter(function (ev) { if (idx != p) { j(btns[p]).removeClass('on'); btn.addClass('on'); p = idx; el_ani.stop().animate({ top: -pw * idx }, 300); } return false; }); }).eq(1).mouseenter(); }); [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]