first-child 和last-child是伪类选择器,选择第一个和选择最后一个子元素
现在实现下面的效果
<div class="menuico"><span></span><span></span><span></span></div>
.menuico span {display: block;width: 21px;height: 2px;background-color: #666;}.menuico span:first-child {margin-top: -6px;}.menuico span:last-child {margin-top: 6px;}