我该如何阅读?此V-TAB正在创建一个按钮并设置其属性,但是这些属性中的哪一个负责文本颜色?

发布于 2025-01-25 19:24:24 字数 1634 浏览 2 评论 0原文

v-tab下面给出的V-app-bar上创建此按钮(右一个

“在此处输入图像说明”

<v-tab
                :to="'/demo'"
                active-class="text--primary"
                class="
                  font-weight-bold
                  white--text
                  v-btn v-btn--depressed v-btn--flat v-btn--outlined
                  theme--dark
                  deep-purple--text
                  text--accent-4
                  mx-1
                  my-2
                "
                min-width="96"
                text
                >{{ $i18n.t("Registration") }}
              </v-tab>
              <v-tab :to="'/registration'"> </v-tab>

我的意思是问我如何读取[ class =“” v-tab的],哪些属性负责V-BTN和文本颜色的背景颜色。

我了解的 v-btn-- outline创建一个概述的按钮,v-btn - flat flat flat或yound,mx1my-2边距。

什么white-texttheme-darktext - accent-4deep-purple-- teep-purple-- text 在做? 而且,如果我想将按钮更改为

<v-btn
                      outlined
                      color="#0e2672"
                      elevation="2"
                      dark
                      large
                      @click="login"
                      :loading="loading"
                      >{{ $i18n.t("Demo") }}</v-btn
                    >

“ V-TAB”部分中的哪些更改?而且,我也喜欢获得任何可以帮助我理解所有这些的参考材料。

V-tab given below creates this button(right one) on v-app-bar

enter image description here

<v-tab
                :to="'/demo'"
                active-class="text--primary"
                class="
                  font-weight-bold
                  white--text
                  v-btn v-btn--depressed v-btn--flat v-btn--outlined
                  theme--dark
                  deep-purple--text
                  text--accent-4
                  mx-1
                  my-2
                "
                min-width="96"
                text
                >{{ $i18n.t("Registration") }}
              </v-tab>
              <v-tab :to="'/registration'"> </v-tab>

What i am meaning to ask is how do i read the [ class = "" ] of the v-tab and which of the properties is responsible for background color of v-btn and text color.

What i understood do for
v-btn--outline creates a outlined button , v-btn--flat flat or round, mx1 and my-2 margins.

What white--text, theme--dark, text--accent-4, deep-purple--text are doing?
and if i want the button to change to

<v-btn
                      outlined
                      color="#0e2672"
                      elevation="2"
                      dark
                      large
                      @click="login"
                      :loading="loading"
                      >{{ $i18n.t("Demo") }}</v-btn
                    >

what changes in the v-tab section should i make? And also i like get any reference material that would help me understand all this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伤痕我心 2025-02-01 19:24:24

背景信息&amp;资源

许多开发人员今天使用“实用程序类” - 根据类名称自动设置样式的库(更多)。

如何知道哪一个影响背景

也是如此。
要知道哪个类属性生成按钮颜色,您都可以:

  1. 检查此类的样式表。
  2. 或查看样式库文档(在HTML页面的顶部查找以了解其是哪个库的链接)
  3. 或生成演示div并将类附加到其上,以查看每个类别如何反应/逐渐从您的元素中删除类。

据我所能帮助您查看整个代码(也许给出了一些链接)。尽管有时通用答案会更好,因为我们可以从中学到更多。希望这很有帮助。

我的猜测是:主题 - 暗销是唯一影响颜色的人。

要更改背景

颜色您可以:

  1. 尝试根据此库添加一些类
  2. ,或者简单地使用:style =“ background-color:skyblue”在此V-TAB元素中。

Background information & resources

Many developers today use 'utility classes` - libraries that automatically set styles according to class name (Reead more).

How to know which one affects background

This is the case here as well.
To know which class property generates the button color you can either:

  1. check the style sheet for this class.
  2. OR Look into the styling library documentation (look up in the top of the html page for links to know which library it is)
  3. OR Generate demo div and append classes to it to see how each class reacts/ gradually remove classes from your element.

This is as far as I can help whitout see the whole code (maybe give some link to source). Though some times generic answers are better as we can learn more from them. Hope this was helpful.

My guess: theme--dark is the only one affecting the color.

To change background

color you can :

  1. try add some class according to this library
  2. OR simply use: style="background-color: skyBlue” inside this V-tab element.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文