<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功能了。 ...