1

I want to run my HTML5 game only in landscape mode. If I rotate the device from landscape to portrait the appearance should remain in landscape orientation. This code:

 body[orient="portrait"] { margin: 0px; padding: 0px; width: 100%; height: 100%;}

has no effect in my canvas. If I use media-screen orientation the canvas and content is orienting but events inside game are not rotating to portrait.

How can I achieve my requirement?

icedwater
  • 4,472
  • 3
  • 33
  • 47
Gajini
  • 445
  • 1
  • 5
  • 19

0 Answers0