Bootstrap Modal框显示为白色

时间:2016-05-22 23:06:40

标签: jquery html css colors bootstrap-modal

我在w3cschools.com - Simply Me的主题中创建了一个模态框,模态框似乎用白色覆盖。我已经尝试将z-index设置为-1和0和10000,禁用背景,将其放在导航栏上方,但没有一个给定的解决方案有效。有没有人能解决这个错误的模态问题。

Bootstrap Modal Box is Completely white

以下是我的模态框的HTML代码。

  <div class="modal fade" id="ReSyncProfileModal" role="dialog" data-backdrop="false">
    <div class="modal-dialog modal-md">
      <div class="modal-content">
        <div class="modal-header bg-danger">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title"> Hang On </h4>
        </div>
        <div class="modal-body">
          <p>You will have to wait for <span id="ReSyncProfileAfter"></span> seconds before you can "Recheck Profile Status" again.</p>
        </div>
        <div class="modal-footer bg-danger">
          <button type="button" class="btn btn-default" data-dismiss="modal"> Close </button>
        </div>
      </div>
    </div>
  </div>

而不是解决方案,我想知道究竟是什么导致了这个问题。 (解决方案也很重要:P)

1 个答案:

答案 0 :(得分:0)

你在CSS中改变了一些东西,在HTML中没有错。

对于modal-title类添加color:#000000,以便标题文字显示为黑色。

如果要为内侧模态中的所有元素设置黑色,请为color添加modal-dialog属性

注意:请调试颜色属性(在浏览器中按f12并找出文本颜色设置为白色的位置)

相关问题