Bootstrap模态标题未显示 - :: before :: after

时间:2016-12-08 03:35:59

标签: javascript css twitter-bootstrap bootstrap-modal

当我输入$('#MesageModal').modal('show');时,模态的标题周围有::before::after个选择器,标题看起来很奇怪。有人能告诉我为什么会这样吗?

<div class="modal fade" id="MessageModal" style="display: none">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header>
        <h4 class="modal-title"></h4>
      </div>
      <div class="modal-body">
      </div>
      <div class="modal-footer">
      </div>
    </div>  
  </div>
</div>    

2 个答案:

答案 0 :(得分:0)

$('#MesageModal').modal('show');

应该是

$('#MessageModal').modal('show');

答案 1 :(得分:0)

我有同样的问题,用c#mvc.net,我正在加载一个模态弹出窗口:

<div>
@Ajax.ActionLink("Edit", "Edit", new { id = user.UserId }, new AjaxOptions {HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "mymodal", OnSuccess = "showModal" })
</div>

然后我有这样的mymodal div:

<div id="mymodal">

</div>

div标签之间有一条线,我的标题没有显示。不是&#39;:之前&#39;或者&#39;:之后&​​#39;部分

我只是删除了中间行,我的问题就解决了,就像这样:

<div id="mymodal">
</div>