CSS 选中奇偶子元素

<style>  
#Ulist li:nth-of-type(odd){ margin-left: 20px;}奇数行   
#Ulist li:nth-of-type(even){margin-left: 10px;}偶数行   
<style>  
  
<ul id="Ulist">  
<li>1</li>  
<li>2</li>  
<li>3</li>  
<li>4</li>  
<li>5</li>  
<li>6</li>  
</ul>  

 

posted @ 2017-08-10 14:49  Evo1uti0n  阅读(523)  评论(0编辑  收藏  举报