[英]How to change text color to white for form input labels and paragraphs in bootstrap
Hie, I have a signup form on top of a full-screen video. 嗨,我在全屏视频上方有一个注册表单。 I am using Bootstrap and I don't know how to get white text color for my form labels and the paragraph beside the form.
我正在使用Bootstrap,我不知道如何为表单标签和表单旁边的段落获取白色文本颜色。 I am still very new to Bootstrap I have so far only found colors, the paragraph class colors conflict with my design, I just need to get white but I don't know how to do it.
我对Bootstrap还是很陌生,到目前为止我只发现颜色,该段落类的颜色与我的设计冲突,我只需要获取白色即可,但是我不知道该怎么做。 I realize that this may be all to simple and I apologize and I apologize in advance if that is the case.
我意识到这可能很简单,我对此表示歉意,如果是这样的话,我事先表示歉意。 Any help will be greatly appreciated.
任何帮助将不胜感激。
Here is my code: 这是我的代码:
<div class="container-fluid">
<section class="container">
<div class="container-page">
<div class="col-md-6">
<h3 class="dark-grey">Registration</h3>
<div class="form-group col-lg-12">
<label>Username</label>
<input type="" name="" class="form-control" id="" value="">
</div>
<div class="form-group col-lg-6">
<label>Password</label>
<input type="password" name="" class="form-control" id="" value="">
</div>
<div class="form-group col-lg-6">
<label>Repeat Password</label>
<input type="password" name="" class="form-control" id="" value="">
</div>
<div class="form-group col-lg-6">
<label>Email Address</label>
<input type="" name="" class="form-control" id="" value="">
</div>
<div class="form-group col-lg-6">
<label>Repeat Email Address</label>
<input type="" name="" class="form-control" id="" value="">
</div>
<div class="col-sm-6">
<input type="checkbox" class="checkbox" />Sigh up for our newsletter
</div>
<div class="col-sm-6">
<input type="checkbox" class="checkbox" />Send notifications to this email
</div>
</div>
<div class="col-md-6">
<h3 class="dark-grey">Terms and Conditions</h3>
<p>
By clicking on "Register" you agree to The Company's' Terms and Conditions
</p>
<p>
While rare, prices are subject to change based on exchange rate fluctuations -
should such a fluctuation happen, we may request an additional payment. You have the option to request a full refund or to pay the new price. (Paragraph 13.5.8)
</p>
<p>
Should there be an error in the description or pricing of a product, we will provide you with a full refund (Paragraph 13.5.6)
</p>
<p>
Acceptance of an order by us is dependent on our suppliers ability to provide the product. (Paragraph 13.5.6)
</p>
<button type="submit" class="btn btn-primary">Register</button>
</div>
</div>
</section>
</div>
you can apply white color to label and p tag as below 您可以如下将白色应用于标签和p标签
.form-group label, p{
color: #fff;
}
it it doesnt work use !important
它不起作用使用
!important
.form-group label, p{
color: #fff!important;
}
This should be as simple as: 这应该很简单:
body {
background-color: black;
}
p,label {
color: white;
}
See codepen here: http://codepen.io/BoyWithSilverWings/pen/NbjOgJ 在此处查看codepen: http ://codepen.io/BoyWithSilverWings/pen/NbjOgJ
This should do it: 应该这样做:
form, input, label, p {
color: white !important;
}
In most cases when using bootstrap, you will need !important
to override the existing bootstrap css style. 在大多数情况下,使用引导程序时,将需要
!important
覆盖现有的引导程序CSS样式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.