Orientation2 [media] window screen orientation 감지해서 Landscape 보여주기 모바일 디바이스에서 portrait일 경우 가로로 웹사이트 렌더링 시키기 function updateOrientation() { const container = document.getElementById('orientation-container'); const isPortrait = window.matchMedia('(orientation: portrait)').matches; const isSmallScreen = window.matchMedia('(max-width: 798px)').matches; if (isPortrait && isSmallScreen) { container.classList.add('force-landscape'); } e.. 2023. 3. 31. @page: how to change size of page when printing, A4, portrait, landscape The @page CSS at-rule is used to modify some CSS properties when printing a document. @Page @page { } /* example */ @page { margin: 1cm; } @page :first { margin: 2cm; } size Specifies the target size and orientation of the page box's containing block. In the general case, where one page box is rendered onto one page sheet, it also indicates the size of the destination page sheet. /* Keyword valu.. 2022. 7. 2. 이전 1 다음