jqprint.css 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. @media print {
  2. /* 页边距 */
  3. @page {
  4. margin: .5cm;
  5. }
  6. * {
  7. background: transparent !important;
  8. color: #333 !important;
  9. box-shadow: none !important;
  10. text-shadow: none !important;
  11. filter: 0 !important;
  12. -ms-filter: 0 !important;
  13. }
  14. thead {
  15. display: table-row-group;
  16. }
  17. /*table-header-group导致页面中出现表头与内容重叠的现象,表头只需在第一页显示即可*/
  18. tr, td, img {
  19. page-break-inside: avoid;
  20. }
  21. h2, h3 {
  22. page-break-after: avoid;
  23. }
  24. p, h2, h3 {
  25. orphans: 3;
  26. widows: 3;
  27. }
  28. table {
  29. width: 100% !important;
  30. padding: 0 !important;
  31. margin: 0;
  32. border-color: #333 !important;
  33. }
  34. table th {
  35. width: 0px !important;
  36. border: 1px solid #333 !important;
  37. white-space: normal !important;
  38. word-break: break-all !important;
  39. }
  40. table td {
  41. width: 0px !important;
  42. white-space: normal !important;
  43. word-break: break-all;
  44. padding: 0 10px;
  45. border-color: #333 !important;
  46. }
  47. /* 打印不要出现滚动条 */
  48. .ui-jqgrid .ui-jqgrid-bdiv,
  49. .ui-jqgrid .ui-jqgrid-bdiv > div {
  50. height: auto !important;
  51. width: 100% !important;
  52. }
  53. }