twitter-bootstrap 将文本框颜色引导程序从白色更改为灰色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26304372/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 21:41:51 来源:igfitidea点击:
changing textbox color bootstrap from white to Gray
提问by Niels Savant
I am trying to chnage to default textbox color white of bootstrap to gray, like this:
我正在尝试将引导程序的默认文本框颜色白色更改为灰色,如下所示:
textarea{
color:gray;
}
But that doesnt work.
但这不起作用。
Thank you
谢谢
I triied that, like this:
我试过,像这样:
textarea{
background-color:gray;
}
and this is for example a textbox:
这是例如一个文本框:
<form class="form-horizontal">
<div class="form-group">
@Html.LabelFor(m => m.UserName, new { @class = "control-label col-xs-2" })
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control", style = "width: 250px;" })
</div>
</form>
But the texbox stays white.
但文本框保持白色。
回答by Harutyun Abgaryan
Use this
用这个
textarea{
background-color:gray !important;
}
For textbox
对于文本框
input[type="text"]{
background-color:gray !important
}

