默认情况下,在v数据表的每个非最后一位行之间打印一行。我想修改css以更改该行,例如将其删除。最初,在开发人员控制台中,关于边框底部的css如下所示。
.theme--light.v-table tbody tr:not(:last-child) {
border-bottom: 1px solid rgba(0,0,0,0.12);
}
Run Code Online (Sandbox Code Playgroud)
我为数据表分配了另一个类“ mytable”:
<v-data-table
:headers="headers"
:items="desserts"
hide-actions
class="elevation-1 mytable">
<template slot="items" slot-scope="props">
<td>{{ props.item.name }}</td>
<td class="text-xs-right">{{ props.item.calories }}</td>
<td class="text-xs-right">{{ props.item.fat }}</td>
<td class="text-xs-right">{{ props.item.carbs }}</td>
<td class="text-xs-right">{{ props.item.protein }}</td>
<td class="text-xs-right">{{ props.item.iron }}</td>
</template>
</v-data-table>
Run Code Online (Sandbox Code Playgroud)
并与CSS我试图修改表
.mytable table tr {
background-color: lightgoldenrodyellow;
border-bottom: none;
}
Run Code Online (Sandbox Code Playgroud)
尽管将背景色更改为浅金色黄色,但仍然打印了边框底部。在开发人员控制台中,触摸了删除边框底部的指令。不是背景色。我还必须使用哪个选择器来更改边框底部?使用与主题最初使用的相同的CSS也不起作用。
我必须使用哪个选择器来更改边框底部?
使用您的自定义类和 vuetify 使用的类
.mytable .v-table tbody tr:not(:last-child) {
border-bottom: none;
}
Run Code Online (Sandbox Code Playgroud)
此外,您可以添加.theme--light是否要专门设置灯光主题的样式。
有关样式 vuetify 组件的更多信息:
CSS 在组件样式 Vuetify 选择器中不起作用(生效)
| 归档时间: |
|
| 查看次数: |
19183 次 |
| 最近记录: |