* { margin:0; padding:0; } .box { width:500px; height:200px; border:1px solid #ccc; margin:100px auto; } ul { width:500px; height:166px; list-style:none; } li { width:120px; height:80px; background-color:cyan; float:left; margin-right:4px; margin-bottom:4px; text-align:center; line-height:80px; } input { width:160px; height:30px; margin-left:170px; outline:none; font-weight:700; background-color:#ccc; } ul .current { background-color:yellow; color:#333; }
改一下就可以实现随机点名哦