我在点击输入按钮时创建了一个登录表单我希望页面为灰色背景
但是我写的代码有问题,就是他们的入口表单也会是灰色的(比如Mozilla firefox Alert)
<div class="wrap">
<button type="button" class="btn-login btn btn-lg ">
Login
<i class="glyphicon glyphicon-user"></i>
</button>
<div class="form-signin">
<p>Login</p>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="fitsname">First Name</label>
<input id="fitsname" class="form-control" type="text"/>
</div>
<div class="form-group">
<label for="lastname">Last Name</label>
<input id="lastname" class="form-control" type="text"/>
</div>
<div class="form-group pull-right">
<button class="btn btn-danger">Cancel</button>
<button class="btn btn-success">Login</button>
</div>
</div>
</div>
</div>
</div>
最佳答案
这似乎是因为您指定表单输入具有 background: rgba(59, 255, 2, 0.5);
这意味着 div 的不透明度为 0.5。这意味着背景会透出来!
这是更新的 jsFiddle
如果您想要与示例中的颜色相同,只需选择合适的 RBG 颜色并将其输入到 background: rgba(59, 255, 2, 1.0);
关于jquery - 灰色屏幕覆盖登录表单中的打开页面(例如 Mozilla Alert),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23013687/