如何更改输入按钮字体颜色?

时间:2014-12-08 23:50:49

标签: html css

我在表单按钮上有以下代码,但我无法更改其内部文本的颜色:

<input type="button" name="continue" value="" class="next">

input.next {
color: white;
background: #199dd9;
text-align: left;
text-transform: uppercase;
}

其他样式(即text-align,bg color)有效,但字体颜色仍为黑色。我在devtools中进行检查,似乎没有任何东西覆盖它。

1 个答案:

答案 0 :(得分:2)

使用HTML5的<input>代码,而不是<button>代码。

button.next {
color: white;
background: #199dd9;
text-align: left;
text-transform: uppercase;
}
<button name="continue" class="next">Click me!</button>

相关问题