margin-boxes-default-text-alignment.html 2.69 KB
Newer Older
1 2 3 4 5 6
<!DOCTYPE html PUBLIC>
<html lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <title>
7
      Margin boxes default text alignement
8 9
    </title>

10
    <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113


    <style>
      :root{
        font-size: 18px;
      }
      @page {
      size: 6in 8in;
      margin: 30mm 20mm;
      @top-left-corner{ 
        content: "A"; 
        background-color: crimson;
      }
      @top-left{ 
        content: "top-left";
        background-color: coral;
        
      }
      @top-center{ 
        content: "top-left";
        background-color: yellow;
        text-align: center;
      }
      @top-right{ 
        content: "top-left";
        background-color: coral;
      }
      @top-right-corner{ 
        content: "B"; 
        background-color: crimson;
      }
      @right-top{ 
        content: "right-top"; 
        background-color: cornflowerblue;
      }
      @right-middle{ 
        content: "right-middle";
        background-color: aquamarine; 
      }
      @right-bottom{ 
        content: "right-bottom"; 
        background-color: cornflowerblue;
       }
      @bottom-right-corner{ 
        content: "C"; 
        background-color: crimson;
      }
      @bottom-left{ 
        content: "bottom-left";
        background-color: coral;
      }
      @bottom-center{ 
        content: "bottom-left";
        background-color: yellow;
      }
      @bottom-right{ 
        content: "bottom-left";
        background-color: coral;
      }
      @bottom-left-corner{ 
        content: "D"; 
        background-color: crimson;
      }
      @left-top{ 
        content: "left-top"; 
        background-color: cornflowerblue;
      }
      @left-middle{ 
        content: "left-middle";
        background-color: aquamarine; 
      }
      @left-bottom{ 
        content: "left-bottom"; 
        background-color: cornflowerblue;
      }

      }


       p {
        line-height: 22px;
      }


    </style>





  </head>
  <body>


  <section>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non suscipit odio. Aenean ut ligula id mauris efficitur tincidunt vitae non leo. In convallis convallis leo, eget molestie metus imperdiet eu. Praesent pharetra, leo a laoreet mattis, ligula nisl commodo ante, non vestibulum nisi lacus eget magna. Maecenas scelerisque nibh ac felis egestas, egestas elementum risus pellentesque. Nulla iaculis ut leo a iaculis. Donec vel sodales dolor, vel fringilla elit. Vivamus aliquam diam eu maximus elementum. Integer eu urna at felis fermentum hendrerit.
    </p>
    
   
  </section>

</body>