TAG
CSS
JavaScript
Result
Run
License
<h1>Example Title</h1> <h1 class="title-for-landscape">Example Title for Landscape</h1> <button id="btn-print">Print..</button>
@page landscape { size: A4 landscape; } .title-for-landscape { page: landscape; } @media print { #btn-print { display: none; } }
window.addEventListener("load", () => { const elBtnPrint = document.getElementById("btn-print"); elBtnPrint.addEventListener("click", () => { window.print(); }); });
Console
expand_less
License
License
by DevDic
Close