嵌入式PDF不能在模态中滚动

时间:2018-10-12 17:31:47

标签: pdf scroll bootstrap-modal

我无法在网站上以嵌入式模式浏览PDF。您可以在台式机上滚动到第二页,但在移动设备上则不能。在我的手机上,它显示PDF的第一页,但是当我滚动时,背景会滚动。有人可以帮忙吗?

这是我的HTML:

        <div class="modal-button">
          <!-- Large modal button -->
          <button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Resume</button>
          <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static"  data-keyboard="false">
            <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" id="myModalLabel">Resume</h4>
                </div><!-- end modal-header -->
                <div class="modal-body">
                  <embed id="modalembed" src="resume/Resume.pdf">
                </div><!-- end modal-body -->
              </div><!-- end modal-content -->
            </div><!-- end modal-dialog -->
          </div><!-- end modal -->
        </div><!-- end modal-button -->

这是我的CSS:

.modal-button {
    float: left;
    padding-top: 15px;
}
.modalembed {
    height: 500px;
    width: 100%;
    padding: 10px;
}
.btn-primary {
    background-color: #494E6B;
    border-color: #181d26;
}
.btn-primary:hover {
    background-color: #192231;
    border-color: #192231;
}

0 个答案:

没有答案