<style> li:nth-of-type(odd){ margin-left: 5px;}奇數行 li:nth-of-type(even){margin-left: 5px;}偶數行 </style> <ul ...
lt style gt Ulist li:nth of type odd margin left: px 奇數行 Ulist li:nth of type even margin left: px 偶數行 lt style gt lt ul id Ulist gt lt li gt lt li gt lt li gt lt li gt lt li gt lt li gt lt li gt lt ...
2017-05-12 21:33 0 8860 推薦指數:
<style> li:nth-of-type(odd){ margin-left: 5px;}奇數行 li:nth-of-type(even){margin-left: 5px;}偶數行 </style> <ul ...
ul li :后代選擇器,ul 里所有的 li 元素,包括 ol 里的 li ; ul>li :子代選擇器,下一級的DOM節點,不包括 ol 里的 li 。 ul>ol>li :子代選擇器必須一代接一代。 ...
.list ul li:nth-child(even){ ...} //li的偶數行樣式 .list ul li:nth-child(odd){ ...} //li的奇數行樣式 .list ul li:nth-child(1){ top:0;} //第一個 ...
...
odd表示奇數行,even表示偶數行; tr:nth-child(odd); .table-striped > tbody > tr:nth-child(odd) { background-color ...
ul列表: #Ulist li:nth-of-type(odd){ margin-left: 20px;}奇數行 #Ulist li:nth-of-type(even){margin-left: 10px;}偶數行 ...
響應式布局中寬度與高度相同 純css方法設置ul中li寬高相等 關鍵詞:VW / VH vw:視窗的寬度 vh:視窗的高度 思路:根據vw獲取視圖寬度從而設置li的寬度等於高度 代碼: <li> <div class="test"> ...
先上效果圖: 再上代碼: END PS:話說Editplus3真是一款好編輯器,現在流行的都沒有直接查看HTML功能了。 ...