javascript - 如何打印整个 Bootstrap 模态,其中模态主体中的内容被滚动出 View

标签 javascript jquery twitter-bootstrap printing bootstrap-modal

问题是用户必须向下滚动才能查看模态主体内的所有内容。但是,当我打印模态时,唯一打印的部分是可见的部分。我想要打印整个模式的内容。我已经尝试了下一页上的每一段代码,但没有一个能打印出整个模态。

Twitter Bootstrap: Print content of modal window

最佳答案

与 angularjs UI Bootstrap 库面临同样的问题。尝试了上面提供的链接,但没有成功。当模式比视口(viewport)LONGER时,唯一对我有用的 CSS 是:

@media print {
    .modal {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 0;
        overflow: visible!important;
    }
}

注意:position:absoluteoverflow:visible必须的。 希望这也可以解决您在打印 angularUI-Bootstrap-Modal 时遇到的问题。

关于javascript - 如何打印整个 Bootstrap 模态,其中模态主体中的内容被滚动出 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29482477/

相关文章:

javascript - 将更改推送到已部署的 Meteor.js 应用程序

javascript - 无法使用输入过滤表过滤器上的分页

jquery - UI.Layout jquery 插件

html - 如何将此图像与文本居中对齐?

javascript - 隐藏内容直到其父级被点击

javascript - 元素不随 jquery ajax 接收到的数据移动

javascript - 如何在 ExtJS 中为 AJAX 调用创建 JSON?

javascript设置高度

javascript - 对数组对象进行分组,使具有相似键的对象不会放入同一组中

javascript - 难以尝试在选择器的迷你对象中使用 .find() 和 .children