Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS-第一个子选择器不工作_Css - Fatal编程技术网

CSS-第一个子选择器不工作

CSS-第一个子选择器不工作,css,Css,我使用bulma作为css框架,在我的页面上有一个部分,我在其中循环项目,并创建多行列 <section class="section employees"> <div class="container"> <div v-for="(value, key) of employeesGroupedByDepartments"> <div class="columns is-multiline departmen

我使用bulma作为css框架,在我的页面上有一个部分,我在其中循环项目,并创建多行列

<section class="section employees">
    <div class="container">
        <div v-for="(value, key) of employeesGroupedByDepartments">
           <div class="columns is-multiline department">
                <div class="title-with-line">
                  <h4><span>{{ key }}</span></h4>
                </div>
                <div class="employee column is-3" v-for="employee of value">
                    <div class="card">
                        <figure class="image is-96x96">
                            <img :src="employee.image.data.path" alt="">
                        </figure>
                        <h4 class="title is-5">
                            {{employee.title}}
                        </h4>
                        <h6 class="subtitle is-6">
                            <small>
                               {{getExtras(employee, 'position')}}
                            </small>
                        </h6>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

我做错了什么?

A
.column
永远不会是
第一个孩子,因为它前面总是有一个带行的
div.title

发件人:

:first-child CSS伪类表示一组同级元素中的第一个元素


您需要or选择器。

。列
不是第一个子项,因为您有一个带有class
标题的div,该div带有行
。您需要的是:

.employees {
   .column:nth-child(2), .employee:nth-child(2) {
      padding-left: 0!important;
   }
}

您是否遗漏了employee类的“.”点?对,您必须将divs.列包装到新层中
.employees {
   .column:nth-child(2), .employee:nth-child(2) {
      padding-left: 0!important;
   }
}