css - 有没有办法选择每隔一个部分 - CSS中的行
问题描述
我正在尝试在每个第二个或(偶数)部分中选择 .row 类。
我只是无法理解或找到解决方案。
我试过了:(没有用)..
.row:nth-of-type(2){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.row:nth-child(2){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.row:nth-of-type(even){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.row:nth-child(even){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.section:nth-of-type(2){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.section:nth-child(2){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.section:nth-of-type(even){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
.section:nth-child(even){
flex-direction: row-reverse;
background-color: #a5a5a536;
}
解决方案
推荐阅读
- jquery - 加载ajax请求时如何更新文本文件?Eclipse Tomcat
- javascript - ElectronJS 缓存
- java - 拖放项目触摸助手后在房间数据库中保存位置
- javascript - 在AngularJS中将方法作为参数传递
- java - Google Sheets API (Java) - 更新格式
- angular - id,name,price,ImageUrl 未定义?
- reactjs - 不能在 getInitialProps 中使用“fs”
- javascript - 我无法在 javascript 中使用 for 循环在字符串中显示元音
- python - 不同的python文件共享相同的变量
- xml - 如何使用不可见的属性(Odoo 14)