小编use*_*ser的帖子

如何在html中划分3个相等的部分li

嗨,在下面的代码中如何将空间划分为所有迭代列表,它应该是中心.除了Home如何划分3个相等的部分

预期产量:首页| 关于| 服务

    #section ul {
    	width: 1050px;
    	margin: 1px auto 0 auto;
    	height: 50px;
    	padding: 0;
    	float: relative;
    	border-style: solid;
        border-width: 1px;
    	background-color: #556B2F;
    }

    #section ul li {
    	position: relative;
    	list-style-type: none;
        display: inline;
    }

    #section li:before {
    	content: " | ";
    }

    #section li:first-child:before {
        content: none;
    }
      
Run Code Online (Sandbox Code Playgroud)
    <div id="section">
    	<ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Service</a></li>
        </ul>
    </div>
Run Code Online (Sandbox Code Playgroud)

html css

1
推荐指数
1
解决办法
1293
查看次数

标签 统计

css ×1

html ×1