【问题标题】:Setting font color inside button not working在按钮内设置字体颜色不起作用
【发布时间】:2020-04-25 13:12:40
【问题描述】:

我在设置按钮样式时遇到了一些问题。我对此比较陌生,所以我确信这与我的选择器有关。我正在尝试将字体设置为具有“活动”类的按钮的白色。两个按钮都有灰色字体,就好像它们包含非活动状态一样。我的代码如下:

<div class="form">
        <ul class="tab-group">
            <button class="active" type="button" id="btn-show-login">Log In</button>
            <button class="inactive" type="button" id="btn-show-signup">Sign Up</button>
        </ul>
...
</div>
.tab-group {
    ...
    .active button {
          background:$main;
          color:$white;
     }
}

【问题讨论】:

    标签: css sass css-selectors


    【解决方案1】:

    试试button.active,它会起作用的!

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 2018-04-17
      • 2013-08-30
      • 1970-01-01
      • 2023-03-03
      • 2011-05-16
      • 2018-05-16
      相关资源
      最近更新 更多