


How to operate the width and height attributes of the page, visual area, screen, etc.
This time I will show you how to operate the width and height properties of the page, visual area, and screen , and how to operate the width and height properties of the page, visual area, and screen Precautions What are they? Here are actual cases. Let’s take a look.
About some related width and height attributes of the page, visual area, screen, etc.function size(){ document.write( "屏幕分辨率为:"+screen.width+"*"+screen.height +"<br />"+ "屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight +"<br />"+ "网页可见区域宽:"+document.body.clientWidth +"<br />"+ "网页可见区域高:"+document.body.clientHeight +"<br />"+ "浏览器窗口宽:"+document.documentElement.clientWidth +"<br />"+ "浏览器窗口高:"+document.documentElement.clientHeight +"<br />"+ "html所有元素宽:"+document.documentElement.offsetWidth +"<br />"+ "html所有元素高:"+document.documentElement.offsetHeight +"<br />"+ "网页可见区域宽(包括边线的宽):"+document.body.offsetWidth +"<br />"+ "网页可见区域高(包括边线的宽):"+document.body.offsetHeight +"<br />"+ "网页正文全文宽:"+document.body.scrollWidth +"<br />"+ "网页正文全文高:"+document.body.scrollHeight +"<br />"+ "网页被卷去的高:"+document.body.scrollTop +"<br />"+ "网页被卷去的左:"+document.body.scrollLeft +"<br />"+ "网页正文部分上:"+window.screenTop +"<br />"+ "网页正文部分左:"+window.screenLeft +"<br />"+ "屏幕分辨率的高:"+window.screen.height +"<br />"+ "屏幕分辨率的宽:"+window.screen.width +"<br />"+ "屏幕可用工作区高度:"+window.screen.availHeight +"<br />"+ "屏幕可用工作区宽度:"+window.screen.availWidth ); }
offsetWidth | clientWidth | scrollWidth |
offsetHeight | clientHeight | scrollHeight |
offsetLeft | clientLeft | scrollLeft |
offsetTop | clientTop | scrollTop |
The above is the detailed content of How to operate the width and height attributes of the page, visual area, screen, etc.. For more information, please follow other related articles on the PHP Chinese website!

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

AI Hentai Generator
Generate AI Hentai for free.

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

Want to copy a page in Microsoft Word and keep the formatting intact? This is a smart idea because duplicating pages in Word can be a useful time-saving technique when you want to create multiple copies of a specific document layout or format. This guide will walk you through the step-by-step process of copying pages in Word, whether you are creating a template or copying a specific page in a document. These simple instructions are designed to help you easily recreate your page without having to start from scratch. Why copy pages in Microsoft Word? There are several reasons why copying pages in Word is very beneficial: When you have a document with a specific layout or format that you want to copy. Unlike recreating the entire page from scratch

Many friends need to turn off the screen to protect the screen when they leave the computer, but they don’t want to lock the screen because they turn off the screen. When they come back, they have to enter a password to enter the system. In fact, we can complete this step through settings. Let’s take a look at it together. Bar. Tutorial on turning off the screen without locking the screen in win10 1. First enter settings and select "Personalization" 2. Click "Lock Screen" on the left 3. Select "Screen Saver Settings" below 4. Uncheck "Show login on recovery" Screen" 5. Then click "Change Power Settings" 6. Select the icon settings on the left. 7. Set a time to turn off the monitor, and then change the sleep status to "Never" 8. Then return to the power settings just now and select the sleep time below. 9. Use the same as above

When many friends are using their mobile phones, they suddenly find that the operation interface of the mobile phone has turned into "black and white" color. They don't know what causes it or how to solve it. This article uses Android mobile phones as an example to teach you how to make it work. The color of the mobile phone's operating interface returns to normal. 1. Set up the interface of the mobile phone and find the "gear-shaped" icon in the operation interface. As shown below: Click this icon to enter the phone’s settings interface. 2. Options The operating interface of the mobile phone has changed to black and white, which is related to the "Display" setting of the mobile phone. After entering the settings interface of the mobile phone, find the "Display and Theme" option in the drop-down menu, as shown below: Then click "Display and Theme" option to enter the details page. 3. After changing the screen color and entering the "Display and Theme" option, find the "

What many users are most concerned about is whether the miniLED screen will hurt the eyes. In fact, although the brightness of this screen can reach extremely high, it will not hurt the eyes and can still be used normally. Does the miniled screen hurt your eyes? Answer: It does not hurt your eyes. Although the brightness of the miniLED screen will be higher, it will not continue to maintain this brightness during daily use. It will only be displayed when the brightness needs to be increased, so it will not always maintain high brightness and hurt the eyes. This peak brightness is also for better Good presentation and expression. MiniLED screen introduction 1. MiniLED backlight display technology uses backlight, so the biggest difference from LCD is the backlight layer 2. Compared with LCD screen, the performance of miniLED will be higher.

Screenshot feature not working on your iPhone? Taking a screenshot is very easy as you just need to hold down the Volume Up button and the Power button at the same time to grab your phone screen. However, there are other ways to capture frames on the device. Fix 1 – Using Assistive Touch Take a screenshot using the Assistive Touch feature. Step 1 – Go to your phone settings. Step 2 – Next, tap to open Accessibility settings. Step 3 – Open Touch settings. Step 4 – Next, open the Assistive Touch settings. Step 5 – Turn on Assistive Touch on your phone. Step 6 – Open “Customize Top Menu” to access it. Step 7 – Now you just need to link any of these functions to your screen capture. So click on the first

Many friends find that when adjusting the resolution of the computer, the screen resolution is increased and the screen is black. What should I do? In fact, the screen resolution of our computer can also be adjusted freely. If we cannot adjust it, then either the graphics card is faulty. If there is a problem, or we have not set up the computer properly, today the editor has brought a solution to the black screen when the computer screen resolution is increased. Let’s take a look at the details. Solution to black screen when the screen resolution is increased 1. Turn on the computer and press the F8 key to enter "Advanced Mode". 2. Select "Safe Mode" and press Enter to confirm. 3. After entering, right-click on a blank space on the desktop, select screen resolution, select a resolution suitable for the screen, and click OK after the settings are completed. Resolution related issues>>>Screen

Although it will be a long time before the release of the iPhone 16 series, there have been constant revelations about the appearance and configuration. According to Korean media SisaJournal, Apple plans to introduce new ultra-narrow bezel technology in the upcoming iPhone 16 series of mobile phones. The technology involves rolling internal copper wires into a more compact structure to reduce the bezel width of the phone's bottom display, allowing for a larger display. This innovative move aims to enhance the user experience, allowing users to enjoy a wider field of view and a more immersive entertainment experience. Apple has always been committed to continuously improving its product design and technology to bring more advanced functions and performance to users. The launch of the iPhone 16 series of mobile phones will further consolidate Apple’s leadership in smart phones. According to @SnapaDigital, Apple’s new

I believe many friends have encountered the problem that their mobile phones suddenly prompt: Do not cover the top of the screen. So why does the mobile phone suddenly appear like this? Let’s take a look together below. In fact, when this happens, something is blocking the distance sensor of the phone, so this prompt is received on the screen of the phone. So why did I suddenly receive such a prompt? In fact, it may be that you have accidentally turned on the [anti-accidental touch mode] on your phone, so this problem occurs. So how do we close it? In fact, the method is very simple. Let’s take a look at it together. Method 1: Directly follow the on-screen prompts to close using the shortcut key combination. Method 2: If the above method does not work, you can also open the phone’s [Settings]
