暂无描述

paper.css 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. @page { margin: 0 }
  2. body { margin: 0 }
  3. .sheet {
  4. margin: 0;
  5. overflow: hidden;
  6. position: relative;
  7. box-sizing: border-box;
  8. page-break-after: always;
  9. }
  10. /** Paper sizes **/
  11. body.A3 .sheet { width: 297mm; height: 419mm }
  12. body.A3.landscape .sheet { width: 420mm; height: 296mm }
  13. body.A4 .sheet { width: 210mm; height: 296mm }
  14. body.A4.landscape .sheet { width: 297mm; height: 209mm }
  15. body.A5 .sheet { width: 148mm; height: 209mm }
  16. body.A5.landscape .sheet { width: 210mm; height: 147mm }
  17. body.letter .sheet { width: 216mm; height: 279mm }
  18. body.letter.landscape .sheet { width: 280mm; height: 215mm }
  19. body.legal .sheet { width: 216mm; height: 356mm }
  20. body.legal.landscape .sheet { width: 357mm; height: 215mm }
  21. /** Padding area **/
  22. .sheet.padding-10mm { padding: 10mm }
  23. .sheet.padding-15mm { padding: 15mm }
  24. .sheet.padding-20mm { padding: 20mm }
  25. .sheet.padding-25mm { padding: 25mm }
  26. /** For screen preview **/
  27. @media screen {
  28. body { background: #e0e0e0 }
  29. .sheet {
  30. background: white;
  31. box-shadow: 0 .5mm 2mm rgba(0,0,0,.3);
  32. margin: 5mm auto;
  33. }
  34. }
  35. /** Fix for Chrome issue #273306 **/
  36. @media print {
  37. body.A3.landscape { width: 420mm }
  38. body.A3, body.A4.landscape { width: 297mm }
  39. body.A4, body.A5.landscape { width: 210mm }
  40. body.A5 { width: 148mm }
  41. body.letter, body.legal { width: 216mm }
  42. body.letter.landscape { width: 280mm }
  43. body.legal.landscape { width: 357mm }
  44. }