【问题标题】:Text area background color is working in chrome but not in firefox文本区域背景颜色在 chrome 中有效,但在 Firefox 中无效
【发布时间】:2021-05-24 21:03:09
【问题描述】:

我想更改文本区域的背景颜色。它在 Chrome 中运行良好,但在 Firefox 中无法运行;即使是内联 CSS 在 Firefox 中也不起作用。

我正在自定义 bootstrap 4 材质包主题

火狐:

铬:

【问题讨论】:

  • 请提供您的代码或重现问题的示例。

标签: html css forms


【解决方案1】:

你可以试试这个,

textarea{
 background-color : red;
-moz-appearance: none !important;
}

【讨论】:

    【解决方案2】:

    试试这个

    textarea{
      background-color: green;
    }
    <!DOCTYPE html>
    <html lang="en">
    <body>
        <textarea name="" id="" cols="30" rows="10">
            some text in the textare
        </textarea>
    </body>
    </html>

    https://jsfiddle.net/a3805r9q/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-23
      • 2016-02-19
      • 2022-01-23
      • 1970-01-01
      • 2020-04-04
      • 2011-03-16
      相关资源
      最近更新 更多