nth-child选择器写法
.list{ border-radius: 5px; padding: 10px; position: relative; } .list:nth-child(odd) { background-color: white; }
nth-child前面要不重复写.list,要怎么直接跟第一个css连起来
abcyoui
2020/11/29 18:45- css
- 点赞
- 收藏
- 回答
满意答案
.list{ border-radius: 5px; padding: 10px; position: relative; } .list:nth-child(odd) { background-color: white; }
nth-child前面要不重复写.list,要怎么直接跟第一个css连起来