Home >Web Front-end >uni-app >How to get the screen height in uniapp
How uniapp gets the screen height: First create a new [uni-app] project and find the onLoad method; then write the [uni.getSystemInfo] method and prepare the width and height variables; finally assign the screen width and height to the variables.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version. This method is suitable for all brands of computers.
Recommended (free): uni-app development tutorial
Uniapp method to get the screen height:
1. Create a new uni-app project, as shown in the figure below
2. Find the onLoad method, as shown in the figure below
3. Write the uni.getSystemInfo
method, as shown in the figure below
4. Prepare the width and height Variables, as shown in the figure below
5. Assign the screen width and height to variables, as shown in the figure below
6. Finally, you can also print the res and take a look at the content inside, as shown in the picture below
##Related free learning recommendations:php Programming(video)
The above is the detailed content of How to get the screen height in uniapp. For more information, please follow other related articles on the PHP Chinese website!