javascript - 为什么我得到一个带有模态的 slider ?

标签 javascript html css twitter-bootstrap-3 pug

我的模态旁边有一个 slider ,如下所示:

this

我的模式代码是:

 div#myModal.modal.fade.col-md-8.col-md-offset-2(tabindex="-1", role="dialog", aria-labelledby="myModalLabel" aria-hidden="true")
    div.modal-content
        div.modal-body
            p Modal body content.
        div.modal-footer
            button.btn.btn-default(type="button", data-dismiss="modal") Close

然后我从 javascript 调用模态:

  $('#joinBtn').click(function(event) {
        $('#myModal').modal({
        show: true
    })
});

最佳答案

你应该可以添加

 div#myModal.modal.fade.col-md-8.col-md-offset-2(tabindex="-1", role="dialog", aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y: auto;")

或者在您的 CSS 中您可以添加:

.modal {
    overflow-y: auto;
}

关于javascript - 为什么我得到一个带有模态的 slider ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21710739/

相关文章:

javascript - 如何使用 Vanilla Js 进行切换

jquery - 具有较大可点击区域的 HTML 表单

javascript - window.getComputedStyle(elem) 用于元素未悬停的情况,即使它当前悬停

javascript - JavaScript 问题 - 图像居中

javascript - Node.js 中未定义 io

javascript - 未捕获的 TypeError : . 可拖动不是函数(...)

javascript - 在 Fabric.js 中禁用组选择

javascript - 使用 Ionic 框架将 ionic 按钮居中

html - Bootstrap 内容不会随数据扩展

html - CSS - 缓慢的悬停效果