html - 使用 class = row 操作第二个 div

标签 html css

我有以下 html 代码。 是否可以操纵第二行元素以及如何操纵?

<style>
.span11 row{}
</style>

<div class="span11">
    <div class="row"></div>
    <div class="row"></div>
</div>

有效!

.row:nth-child(2){background:#000;}

最佳答案

2 种方式:

  1. .row+.row{background:#000;}
  2. .row:nth-child(2){background:#000;}

关于html - 使用 class = row 操作第二个 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19220549/

相关文章:

jquery - 跳过 li 的列数 css 属性

html - 如何在div之外剪辑动画?

html - 底部宽度的页脚

javascript - 使用 VBA 将数组传入和传出网页中的脚本函数

css - 根据该元素中的值将 css 分配给该元素

html - 在 HTML 中设置 ul 标签的颜色。

javascript - 防止动画在初始页面加载时触发

html - slider 背景图像在 Microsoft Edge 上看起来不太好

java - 如何将 CSS 文件设置为整个应用程序 JavaFX

javascript - 带返回值的跨域弹窗