Created
October 19, 2012 15:42
-
-
Save ericsk/3918936 to your computer and use it in GitHub Desktop.
在 Modern IE10 中使用 @-ms-viewport 來設定可視區域 (viewport) 的大小
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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