模式中的标题不可见。
如果我用鼠标突出显示它,它将变得可见。我尝试添加modal-content
color: #000
,但没有结果。
截至2016 年 1 月 11 日下午 1 点 28 分 CST的回复和答案并未纠正这种情况。
我应该提到我正在努力领先于比赛;使用 Bootstrap 4 Alpha。尽管设置有效,但在 4 的模态部分中看不到任何会产生任何影响的更改top: 100px
。任何其他建议肯定会受到赞赏。
关于HTML代码中有什么问题的任何想法?
<button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
Newsletter
</button>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<h4 class="text-body modal-title" id="myModalLabel">
Subscribe to Newsletter
</h4>
</div>
<div class="modal-body">
<form class="form-signin">
<h2 class="form-signin-heading">Receive Our Newsletter</h2>
<label for="inputEmail" class="sr-only">Name</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Name" required autofocus>
<label for="inputEmail" class="sr-only">City & State</label>
<input type="email" id="inputEmail" class="form-control" placeholder="City & State" required autofocus>
<label for="inputPassword" class="sr-only">Email address</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Email Address" required>
<hr>
<button class="btn btn-lg btn-primary btn-sm" type="submit">Subscribe</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>