Fixed dimension for cordova app

前端 未结 2 480
傲寒
傲寒 2021-01-15 22:05

I am trying to create a cordova application with a fixed width and height.If the device width is higher than the application width then it will display inside of the device

2条回答
  •  隐瞒了意图╮
    2021-01-15 22:45

    Assuming your HTML area is in one nice div container - set its position to "absolute" and then use javascript to explicitly set its X position with xpos = (screenWidth - htmlWidth)/2

提交回复
热议问题