0

我正在将 MVC 与 angularjs 一起使用并开发 SPA。我正在使用以下引导程序对话框的代码,该对话框通过点击 cshtml 页面中的按钮打开。代码运行良好,但全屏变为灰色(禁用),包括对话框。

    <input type="button" value="Save" class="btn btn-info btn-block"  data-toggle="modal"  data-target="#confirmModel">
<section>
    <div id="confirmModel" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">Confirmation</h4>
                </div>
                <div class="modal-body">
                    <p>Do you want to save changes you made to document before closing?</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
        </div>
    </div>
</section>
4

1 回答 1

0

试试这个——

<div class="modal fade" id="confirmModel" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" role="dialog" style="display: none;">
     <div class="modal-dialog">
            <div class="modal-content">
                 <div class="modal-header" align="center">
                    //Your content
                 </div>
            <div>
     </div>
</div>  
于 2017-02-06T10:28:56.267 回答