Paged Media CSS examples

From XPUB & Lens-Based wiki
Revision as of 20:19, 2 February 2021 by Manetta (talk | contribs) (Created page with "=@page= <source lang="css"> @page { size: A5 portrait; } </source> ==@page:right @page:left== <source lang="css"> @page:right { margin-left: 3cm; →‎inner: margin-rig...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

@page

@page {
  size: A5 portrait;
}

@page:right @page:left

@page:right {
  margin-left: 3cm; /*inner*/
  margin-right:1cm; /*outer*/ 
  
  @bottom-right {
    content: "Testing 123!!!";
  }
  
  @bottom-center {
    content: "Testing WeasyPrint";
  }
}

@page:left {
  margin-right: 10mm; /*inner*/
  margin-left: 15mm; /*outer*/

  @bottom-left {
    content: "Testing WeasyPrint";
  }

  @bottom-center {
    content: "Testing WeasyPrint";
  }
}

@page:first

@page:first {
  @bottom-center { 
    content: ""; 
  }
  @bottom-right { 
    content: ""; 
  }
}

pagenumbers

...