How do I print the entire bootstrap modal where content in modal body is scrolled out of view

后端 未结 5 807
我寻月下人不归
我寻月下人不归 2020-12-08 03:18

The problem is that the user has to scroll down to view all of the content within the modal body. However, when I print the modal the only part that is printed is the part t

5条回答
  •  既然无缘
    2020-12-08 03:46

    http://plnkr.co/edit/fspygnqWhsosqDTds0Og?p=preview

    /**Modal Styles for Print**/
    
            @media print {
              body * {
                visibility: hidden;
              }
              #print-content * {
                visibility: visible;
                overflow: visible;
              }
              #mainPage * {
                display: none;
              }
              .modal {
                margin: 0;
                padding: 0;
                min-height: 550px;
                visibility: visible;
                /**Remove scrollbar for printing.**/
                overflow: visible !important;
                position: relative;
              }
              .modal-dialog {
                visibility: visible !important;
                /**Remove scrollbar for printing.**/
                overflow: visible !important;
              }
    

提交回复
热议问题