【问题标题】:is there a way to remove css from vuetify elements and then add your own有没有办法从 vuetify 元素中删除 css,然后添加自己的
【发布时间】:2019-06-05 16:24:26
【问题描述】:

我想添加自己的 css 来覆盖 vuetify v-select 元素

我尝试向元素添加一个类,但它只是在 vuetify 元素下面添加了 css

  <div>
    <VSelect
      v-model="value"
      :items="sortOptions"
      item-text="text"
      :return-object="true"
      class="rectangle"
    />
  </div>
</template>

<style lang="styl">
  .rectangle {
    height: 40px;
    width: 144px;
    border: 1px solid #CCD8DB;
    border-radius: 4px;
    background-color: var(--v-dgrey-lighten3);
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.08);
  }
</style>```

【问题讨论】:

  • 是的...比如this?

标签: css vue.js vuetify.js


【解决方案1】:

尝试在您自己的 css 上添加“!important”以覆盖。示例:

height: 40px !important;

【讨论】:

    猜你喜欢
    • 2020-03-14
    • 2020-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多