* { margin:0; padding:0; } .nav { width:100%; height:60px; background:red; overflow:hidden; } .nav>ul { width:200px; height:20px; margin:20px auto; list-style:none; } .nav>ul>li { width:20px; height:20px; float:left; margin-right:10px; background:white; line-height:20px; cursor:pointer; } .now { background:blueviolet !important; } .box { position:relative; background:palevioletred; overflow:hidden; } .content { width:100%; position:absolute; top:0; } .content>li { font-size:40px; text-align:center; }