* { margin:0; padding:0; } .con { width:300px; height:200px; display:none; } .nav { list-style:none; height:50px; overflow:hidden; } .nav li { float:left; width:100px; height:100px; background:#ccc; color:#000; text-align:center; line-height:50px; } .on { display:block; } .nav li.act { background:#333; color:#fff; }