A4 with margins
@page {
size: A4;
margin: 2cm;
}
The @page at-rule styles printed pages. Set size and margins for the page box so print and print-preview output look intentional.
@page {
size: A4;
margin: 2cm;
}@page {
size: A4;
margin: 2cm;
}@page {
size: landscape;
margin: 1.5cm;
}@page is a modern CSS at-rule.
Check current browsers before relying on advanced behavior.
Bottom line: Use progressive enhancement. Keep a readable fallback when a browser ignores the at-rule.
Continue with @property.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
3 people found this page helpful