Skip to content

Instantly share code, notes, and snippets.

@ericsk
Created October 19, 2012 15:42
Show Gist options
  • Save ericsk/3918936 to your computer and use it in GitHub Desktop.
Save ericsk/3918936 to your computer and use it in GitHub Desktop.
在 Modern IE10 中使用 @-ms-viewport 來設定可視區域 (viewport) 的大小
@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; /* 根據目前裝置的畫面寬度來設定可視區域的寬 */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment