【问题标题】:I have to scroll the vertical bar to click the buttons in the modal-footer我必须滚动垂直条才能单击模态页脚中的按钮
【发布时间】:2020-07-01 01:23:03
【问题描述】:

我正在使用 css 引导弹出模式。在弹出模式页脚中,我有两个按钮。要单击任何按钮,我必须滚动模式本身而不是浏览器或应用程序中的垂直栏,或者我必须放大到小尺寸而不是 100%。是否可以在不滚动垂直条或不更改浏览器缩放的情况下单击按钮。

<div class="modal modal-megamenu" id="dellmodal">
    <div class="modal-dialog modal-megamenu">
        <div class="modal-content modal-megamenu">
            <div class="modal-header modal-megamenu">
                <h4 class="modal-title">scrollbar</h4>
            </div>
            <div class="modal-body modal-megamenu">
                <div class="form-display">
                    <input type="checkbox" name="rejectCheckbox" id="checkbox">
                    &nbsp
                <label>Hi click the button.</label>
                </div>
            </div>
            <div class="modal-footer modal-megamenu">
                <button class="btn btn-default" data-dismiss="modal" type="button">Cancel</button>
                <button class="btn btn-danger" id="remove-button" data-dismiss="modal" data-backdrop="false"
                    type="submit">Reject</button>
            </div>
        </div><!-- end modal-content -->
    </div><!-- end modal-dialog -->
</div>
</div>
</div>

我已尝试更改 css

.modal-footer {
height:50%;
}

与上述行相同,我尝试更改模态对话框,模态标题。 没有任何效果

根据上图,我想在不使用滚动条的情况下单击按钮或减少浏览器缩放。 有人可以帮我吗?

【问题讨论】:

    标签: html css


    【解决方案1】:

    我已经找到了答案 我必须将其包含在我的 css 文件中

    .modal-megamenu {
        max-height: calc(100vh - 400px);
        overflow-y: auto;
    }
    

    【讨论】:

      猜你喜欢
      • 2015-07-02
      • 2020-04-02
      • 2020-06-04
      • 2020-06-29
      • 1970-01-01
      • 1970-01-01
      • 2013-10-31
      • 2012-07-23
      • 1970-01-01
      相关资源
      最近更新 更多