Bootstrap 模式不适用于 Sharepoint 2013

Bootstrap Modal is not working on Sharepoint 2013

当我尝试在 Sharepoint 2013 中打开 Bootstrap Modal-Pop-Up 时遇到问题。当我测试本地页面(不使用 Sharepoint 主页")时,它工作正常,但是,如果我尝试在 Sharepoint 中打开相同的页面,模态将不会被检测为模态,因此整个屏幕都会变灰。

希望有人能帮助我,非常感谢!

这是我的代码:

 <button type="button" class="btn btn-default" data-toggle="modal"  data-target="#mymodal"><span class="glyphicon glyphicon-floppy-disk"></span></button>
<div id="mymodal" class="fade modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
<div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
                <asp:Label runat="server" ID="lblHeader"></asp:Label></h4>
        </div>
        <div class="modal-body">
        <button type="button" class="btn btn-default" >Test</button>
        </div>

    </div>
</div>

我找到问题了。我使用的是 bootstrap3-custom.css "Bootstrap 3 for SharePoint 2013 - Beta V1.0.2" 和以下样式导致了问题:

   #MainRow > div {
    z-index: 0;
}

这可行,但您必须更改#MainRow > div {z-index: auto;}