css how to solve the problem of duplicate table border lines

<ul>
        <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> </ul>

*{ margin:0; padding:0;}
    ul{ width: 520px; height: 312px; margin: 50px auto; } ul li{ list-style: none; width: 100px; height: 100px; float: left; border: 1px solid #999; margin: 0 0 -1px -1px; } 

Just give each li set css properties margin: 0 0 -width -width on it, which is the width border width us to set li

Guess you like

Origin www.cnblogs.com/Better-Me/p/11719879.html