简单响应式导航 适合菜鸟

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=0,initial-scale=1.0">
<title>响应式-导航</title>
<style>
*{ margin:0; padding:0; list-style:none;}
ul{}
li{ width:12.5%; height:40px; line-height:40px; text-align:center; float:left; background:#ccc; border:1px solid #000; box-sizing:border-box;}
@media(max-width:768px){
li{ width:25%;}
}
@media(max-width:480px){
   
li{ width:50%;}
}
</style>
<script>


</script>
</head>


<body>
<ul>
<li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
</ul>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_42043377/article/details/80933093