嗨,我在全屏视频上面有一个注册表单。我正在使用Bootstrap而且我不知道如何为表单标签和表单旁边的段落获取白色文本颜色。我仍然是Bootstrap的新手我到目前为止只发现颜色,段落颜色与我的设计相冲突,我只需要变白但我不知道该怎么做。 我意识到这可能都很简单,我道歉,如果情况确实如此,我会提前道歉。任何帮助将不胜感激。
这是我的代码:
<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>
答案 0 :(得分:0)
您可以将白色应用于标签和p标签,如下所示
.form-group label, p{
color: #fff;
}
它使用!important
.form-group label, p{
color: #fff!important;
}
答案 1 :(得分:0)
这应该简单如下:
body {
background-color: black;
}
p,label {
color: white;
}
请参阅此处的codepen:http://codepen.io/BoyWithSilverWings/pen/NbjOgJ
答案 2 :(得分:0)
这应该这样做:
form, input, label, p {
color: white !important;
}
在大多数情况下,使用bootstrap时,您需要!important
来覆盖现有的bootstrap css样式。