@media print {
  @page {
  }
  * {
    /* 使用你設定好的樣式顏色 */
    -webkit-print-color-adjust: exact !important;
  }
  header nav, footer, video, audio, object, embed {
    display: none;
  }
  body{
    width: 100%;
    margin: 0;
    float: none;
    line-height: 1.5;
    font-size: 12pt;
  }
  img {
    max-width: 100%;
  }
  a:link, a:visited, a {
    background: transparent;
    color: #222;
    font-weight: bold;
    text-decoration: underline;
    text-align: left;
    word-wrap: break-word; /*避免網址過長超出頁面*/
  }
  a[href^="http://"]:after, a[href^="https://"]:after {
    content: " (" attr(href) ") ";
  }
  thead{
    display: table-header-group; /* 表格即使分頁也會顯示表頭 */
  }  
  h1, h2, h3, h4, h5, h6 {
    page-break-after:avoid;
    page-break-inside:avoid
  }
  h1+p, h2+p, h3+p {
    page-break-before: avoid;
  }
  a {
    page-break-inside:avoid
  }
  img{
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  table, blockquote{
    page-break-inside: avoid;
  }
  ul, ol, dl {
    page-break-before:avoid;
  }
  /* 如架構本身用一組一組的 DIV 包住，也可強制設定每組 DIV 會各自切成一頁 */
  div.pageBlock{
    page-break-before: always;
  }
  /* 元素內容中間，不能被換頁 */
  .noBreak {
    break-inside: avoid;
  }
  .noPrint {
    display: none;
  }
}

@media print {
  /* ========================================================= margin */
  .ma-1 {
    margin: 0.5cm;
  }
  /* ========================================================= list */
  .list-unstyled {
    padding-left: 0;
    list-style: none;
  }
  /* ========================================================= display */
  .d-none {
    display: none !important;
  }

  .d-inline {
    display: inline !important;
  }

  .d-inline-block {
    display: inline-block !important;
  }

  .d-block {
    display: block !important;
  }

  .d-flex {
    display: -ms-flexbox !important;
    display: flex !important;
  }

  .d-inline-flex {
    display: -ms-inline-flexbox !important;
    display: inline-flex !important;
  }
}
