vendredi 21 août 2020

CSS Printing html page

I have a HTML project where I must have both portrait and landscape pages in one document. In lots of tutorials/libraries I found that solution is using "named pages" but this instruction doesn't work:

@page landscape {
  size: A4 landscape;
  margin: 0;
}

@page portrait {
  size: A4 portrait;
  margin: 0;
}
body {
  margin: 0px;
}
.landscape {
  page: landscape;
}

.portrait {
  page: portrait;
}

And in my vsCode i have this warning:

code warning code




Aucun commentaire:

Enregistrer un commentaire