javascript - Full screen display problem of mobile game development page
迷茫
迷茫 2017-05-31 10:41:37
0
2
967

Develop a simple small game. The size given in the design drawing is 640*1136. After rem adaptation, some mobile phones with small heights cannot display all the content, and the game cannot use scroll bars. What should I do? Thanks

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
漂亮男人

You can refer to the method in this project: https://wa.qq.com/xplan/earth...
This project has a fixed area to display the earth, orbit, small hands, etc. How to ensure that they are in different sizes Are the relative positions the same?

His method is to layout in a fixed size area (375 * 600), and then scale this fixed area according to the screen size so that it is exactly contained by the screen.

I think your game can also use this method.

The picture below is an example of an area that ensures an inherent proportion at different sizes:

In fact, when designing such a project, you cannot set the proportion too narrowly. If your proportion is set according to the proportion of iPhone 5, then there will be problems displaying it on other devices that are longer or wider than iPhone 5 (even if you use the above method) , you also need to fill the parts outside the area with color or background).

The example I saw before, this design drawing is basically square, which allows it to be displayed differently on devices of different sizes, but the key areas can be displayed.

習慣沉默

overflow, and then adjust the position of the scene according to the lens

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template