Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只想在横向模式下运行我的 HTML5 游戏。如果我将设备从横向旋转到纵向,则外观应保持横向。这段代码:
body[orient="portrait"] { margin: 0px; padding: 0px; width: 100%; height: 100%;}
在我的画布上没有效果。如果我使用media-screen orientation画布并且内容是定向的,但游戏内的事件不会旋转到纵向。
media-screen orientation
我怎样才能达到我的要求?