@media screen and (orientation: landscape) { @-ms-viewport { width: 1024px; height: 768px; } /* 在 landscape 模式下,並且把可視區域的大小設為 1024px * 768px */ } @media screen and (orientation: portrait) { @-ms-viewport { width: 768px; height: 1024px; } /* 在 portrait 模式下,並且把可視區域的大小設為 768px * 1024px */ } @-ms-viewport { width: device-width; /* 根據目前裝置的畫面寬度來設定可視區域的寬 */ }