Paged Media CSS examples: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 58: Line 58:
...
...


 
==display links in print==
<source lang="css">
a[href]:after {
content: ' (' attr(href) ')';
}
</source>





Revision as of 14:59, 5 February 2021

@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

...

display links in print

a[href]:after {
	content: ' (' attr(href) ')';
}