* { margin:0; padding:0; } .wrap { margin:50px auto; width:360px; } ul { list-style:none; width:100%; } .tab li { float:left; width:90px; height:40px; line-height:40px; text-align:center; cursor:pointer; background-color:#fff; } .tab li.active { background-color:#f90; color:#fff; } /*清除浮动*/ .clearfix:after { content:''; display:table; clear:both } .clearfix { *zonm:1; } /* IE 6/7 */ .clearfix { zoom:1; } .product { /*width:360px; */ /*height:180px; */ /*overflow:hidden; */ } .product .main a img { vertical-align:top; } .product .main { display:none; } .product .main.selected { display:block; }
这是个滑动切换的tab切换,模仿新闻滑动的小窗口