


Code based on jQuery to determine whether iPad, iPhone, and Android are horizontal or vertical screen_jquery
In fact, it is mainly implemented through window.orientation. Let’s take a look at the code below
function orient() {
if (window. orientation == 90 || window.orientation == -90) {
//ipad, iphone vertical screen; Andriod horizontal screen
$("body").attr("class", "landscape");
orientation = 'landscape';
return false;
}
else if (window.orientation == 0 || window.orientation == 180) {
//ipad, iphone horizontal Screen; Andriod vertical screen
$("body").attr("class", "portrait");
orientation = 'portrait';
return false;
}
}
//Call
$(function(){
orient();
}) when the page is loaded;
//Call
$(window).bind when the user changes the screen orientation ('orientationchange', function(e){
orient();
});
The window.orientation value corresponding to the screen orientation:
ipad: 90 or -90 for landscape screen
ipad: 0 or 180 for portrait screen
Andriod: 0 or 180 for landscape screen
Andriod: 90 or -90 for portrait screen

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Xiaomi Mi 14 Ultra is a relatively new model on the market. I believe that many consumers who want to change their mobile phones are more concerned about this phone. In addition to the conventional parameter configuration, the appearance design of this phone is also quite good. Of course, some people will also want to know how to use Xiaomi Mi 14Ultra horizontally? , the editor of this site will introduce the relevant content to you in detail below. Come and take a look together! How to use Xiaomi Mi 14Ultra in landscape orientation? Open the phone settings: First, find and open the settings icon on the home screen of Xiaomi 14, which is usually a gear-shaped icon. Enter display settings: In the settings menu, find and click the "Display" option to enter the display settings page. Turn on automatic screen rotation: In the display settings page, go to

Xiaomi Mi 14 is a brand new model with very good performance. Many consumers have been paying attention to it before it was released. It has not disappointed everyone since its official launch. Xiaomi Mi 14 has many user-friendly functions and is very popular. It’s practical, but there are some steps that everyone doesn’t know how to operate. For example, how to set the vertical screen lock on Xiaomi Mi 14? How to set vertical screen lock on Xiaomi Mi 14? Find the Settings app on your home screen or in the app list and open it. Scroll down in the "Settings" interface to find and click the "Display" option. Step 2: In the "Display" interface, scroll down and find the "Auto-rotate screen" option and make sure it is turned off. After turning off "Auto-rotate screen", your Xiaomi Mi 14 will be locked in portrait mode. no matter how you

Honor Magic6 is a newly released flagship model. This phone has very comprehensive functions and features. When using the phone, everyone will set the screen display mode in advance. Both vertical and horizontal screens can be set. So Honor How to set up horizontal screen on Magic6? Let’s take a look below! How to set up horizontal screen on Honor Magic 6? Method 1: Pull down from the top of the phone screen, and then click the [Auto-rotate] icon to turn it gray to turn off rotation and lock the vertical screen. If it turns blue, it turns on auto-rotate. Method 2: Open [Settings] on the Honor mobile phone desktop, continue to click to turn on [Display], and finally click to turn off the switch on the right side of [Auto-rotate]. The method of setting up the horizontal screen on the Honor Magic 6 phone is very simple.

1. Pull down from the upper corner of the screen, pull out the status bar, click [Orientation Lock], it turns gray, and turn the phone sideways to turn it into landscape mode. 2. Or open the phone settings and click Display. 3. Turn off the automatic rotation switch.

WeChat is a social payment platform that everyone often uses. During use, you can set up a horizontal screen mode. Some friends are not very familiar with this. Here I will introduce the setting method. Interested friends come with me to take a look. Take a look. First, open the "WeChat" application on your mobile phone. After entering, find the "Me" option in the lower right corner of the page and click to enter. Then browse to the "Settings" function in the My page, and then click to open. 2. After entering the settings page, find "General" and click on this item to enter. 3. Finally, there is a switch button displayed behind "Turn on landscape mode" on the general page. Click the slider on it to set it to color to turn it on. Then you can use the WeChat interface in landscape mode. .

honor How to set up horizontal screen? Let’s take a look below! How to set up horizontal screen on Honor X50GT? 1. Open the "Settings" option of your phone. 2. Select the "Display" option in the "Settings" interface. 3. Turn on the "Auto-rotate screen" button. At this time, you only need to place the phone horizontally, and the screen will automatically rotate to the horizontal screen state. The Honor X50GT phone supports multiple screen display modes. You can set the horizontal screen according to the above method, or you can set the vertical screen lock when you need to play games or watch videos.

Users may encounter the problem of automatic screen rotation when using Apple mobile phones, which may cause a certain degree of interference to the user's experience. In fact, the method to turn off screen rotation is very simple, and I will introduce it to you today. How to turn off the horizontal screen of Apple mobile phone? Answer: You can turn off the lock direction in the control center. 1. Players open the Apple phone, directly pull down the control center on the right side, and find the lock direction option there. 2. Click the screen once to place it vertically to enter the portrait screen state, and then click again to lock the orientation. 3. If the lock is on, it means the screen will automatically rotate and must be in the locked state. 4. You can also set up the rotating screen through the floating ball. The user opens the settings and selects the auxiliary function. 5. In the auxiliary function

WPS software not only has a computer version, but also a mobile version. Although the medium is different, the functions are equally powerful. When many users use the mobile version of WPS, in order to facilitate their own editing and modification, they will encounter the problem of how to adjust the page from vertical screen to horizontal screen. So in the following article, the editor of this website will bring you a detailed guide on how to edit the horizontal screen of the WPS mobile version. I hope it can help everyone in need. How to convert mobile wps horizontally and vertically 1. Select the document, enter the homepage interface of Apple wpsoffice, open a document that needs to be converted, and enter a new page. 2. Click Tools. After switching to the document page, find the tool option at the bottom of the page and click it to enter the next page. 3. Select View and switch to the new page.
