js code for browser zoom detection
This article mainly introduces the js code for browser zoom detection. Friends in need can refer to it.
Test code
Effect:
chrome:
window.devicePixelRatio : 2 (准确) screen.deviceXDPI / screen.logicalXDPI : NaN window.outerWidth / window.innerWidth : 2 document.documentElement.offsetHeight / window.innerHeight : 0.020618556701030927 (有相关性) window.top.outerWidth / window.top.innerWidth : 2
ff:
window.devicePixelRatio : 1.5 (准确) screen.deviceXDPI / screen.logicalXDPI : NaN window.outerWidth / window.innerWidth : 1.0114583333333333 document.documentElement.offsetHeight / window.innerHeight : 0.023391812865497075 (有相关性) window.top.outerWidth / window.top.innerWidth : 1.0114583333333333
ie 8:
window.devicePixelRatio : undefined screen.deviceXDPI / screen.logicalXDPI : 1.5416666666666667 (大致准确) window.outerWidth / window.innerWidth : NaN document.documentElement.offsetHeight / window.innerHeight : NaN window.top.outerWidth / window.top.innerWidth : NaN
ie11:
window.devicePixelRatio : 1.5 (准确) screen.deviceXDPI / screen.logicalXDPI : 1.5window.outerWidth / window.innerWidth : 1.0084033613445377document.documentElement.offsetHeight / window.innerHeight : 0.02203856749311295 (有相关性)window.top.outerWidth / window.top.innerWidth : 1.0084033613445377
ie10:
window.devicePixelRatio : undefined screen.deviceXDPI / screen.logicalXDPI : 1.5 (准确) window.outerWidth / window.innerWidth : 1.0084033613445377 document.documentElement.offsetHeight / window.innerHeight : 1 window.top.outerWidth / window.top.innerWidth : 1.0084033613445377
ie9:
window.devicePixelRatio : undefined screen.deviceXDPI / screen.logicalXDPI : 1.5 (准确) window.outerWidth / window.innerWidth : 1.0084033613445377 document.documentElement.offsetHeight / window.innerHeight : 1 window.top.outerWidth / window.top.innerWidth : 1.0084033613445377
360 6.3 (no response at all):
window.devicePixelRatio : undefined screen.deviceXDPI / screen.logicalXDPI : 1 window.outerWidth / window.innerWidth : NaN document.documentElement.offsetHeight / window.innerHeight : NaN window.top.outerWidth / window.top.innerWidth : NaN
360 high-speed browser:
window.devicePixelRatio : 1 screen.deviceXDPI / screen.logicalXDPI : NaN window.outerWidth / window.innerWidth : 1.5 document.documentElement.offsetHeight / window.innerHeight : 0.015267175572519083 window.top.outerWidth / window.top.innerWidth : 1.5(准确)
Sogou high-speed browser (complete No response):
window.devicePixelRatio : undefined screen.deviceXDPI / screen.logicalXDPI : 1 window.outerWidth / window.innerWidth : NaN document.documentElement.offsetHeight / window.innerHeight : NaN window.top.outerWidth / window.top.innerWidth : NaN
Taobao browser:
window.devicePixelRatio : 1 screen.deviceXDPI / screen.logicalXDPI : NaN window.outerWidth / window.innerWidth : 2.0710059171597632 (大致准确) document.documentElement.offsetHeight / window.innerHeight : 0.022988505747126436 window.top.outerWidth / window.top.innerWidth : 2.0710059171597632
The above is the entire content of this chapter. For more related tutorials, please visit JavaScript Video Tutorial!

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



The performance of i77700 is completely sufficient to run win11, but users find that their i77700 cannot be upgraded to win11. This is mainly due to restrictions imposed by Microsoft, so they can install it as long as they skip this restriction. i77700 cannot be upgraded to win11: 1. Because Microsoft limits the CPU version. 2. Only the eighth generation and above versions of Intel can directly upgrade to win11. 3. As the 7th generation, i77700 cannot meet the upgrade needs of win11. 4. However, i77700 is completely capable of using win11 smoothly in terms of performance. 5. So you can use the win11 direct installation system of this site. 6. After the download is complete, right-click the file and "load" it. 7. Double-click to run the "One-click

Hello everyone. Today I would like to share with you a fall detection project, to be precise, it is human movement recognition based on skeletal points. It is roughly divided into three steps: human body recognition, human skeleton point action classification project source code has been packaged, see the end of the article for how to obtain it. 0. chatgpt First, we need to obtain the monitored video stream. This code is relatively fixed. We can directly let chatgpt complete the code written by chatgpt. There is no problem and can be used directly. But when it comes to business tasks later, such as using mediapipe to identify human skeleton points, the code given by chatgpt is incorrect. I think chatgpt can be used as a toolbox that is independent of business logic. You can try to hand it over to c

Today I would like to introduce to you an article published by MIT last week, using GPT-3.5-turbo to solve the problem of time series anomaly detection, and initially verifying the effectiveness of LLM in time series anomaly detection. There is no finetune in the whole process, and GPT-3.5-turbo is used directly for anomaly detection. The core of this article is how to convert time series into input that can be recognized by GPT-3.5-turbo, and how to design prompts or pipelines to let LLM solve the anomaly detection task. Let me introduce this work to you in detail. Image paper title: Largelanguagemodelscanbezero-shotanomalydete

01 Outlook Summary Currently, it is difficult to achieve an appropriate balance between detection efficiency and detection results. We have developed an enhanced YOLOv5 algorithm for target detection in high-resolution optical remote sensing images, using multi-layer feature pyramids, multi-detection head strategies and hybrid attention modules to improve the effect of the target detection network in optical remote sensing images. According to the SIMD data set, the mAP of the new algorithm is 2.2% better than YOLOv5 and 8.48% better than YOLOX, achieving a better balance between detection results and speed. 02 Background & Motivation With the rapid development of remote sensing technology, high-resolution optical remote sensing images have been used to describe many objects on the earth’s surface, including aircraft, cars, buildings, etc. Object detection in the interpretation of remote sensing images

Recently, I read a latest research on pure visual surround perception on Arxiv. This research is based on the PETR series of methods and focuses on solving the pure visual perception problem of long-distance target detection, extending the perception range to 150 meters. The methods and results of this paper have great reference value for us, so I tried to interpret it. Original title: Far3D: Expanding the Horizon for Surround-view3DObject Detection Paper link: https://arxiv.org/abs/2308.09616 Author affiliation :Beijing Institute of Technology & Megvii Technology Task Background 3D Object Detection in Understanding Autonomous Driving

With the continuous development of modern web applications, PHP, as one of the most popular programming languages, is widely used in website development. However, during the development process, null value errors are often encountered, and these errors can cause the application to throw exceptions, thus affecting the user experience. Therefore, in the PHP development process, how to detect and deal with null errors is an important skill that programmers need to master. 1. What is a null value error? In the PHP development process, null value errors usually refer to two situations: uninitialized variables and variable variables.

Written above & The author’s personal understanding is that in the autonomous driving system, the perception task is a crucial component of the entire autonomous driving system. The main goal of the perception task is to enable autonomous vehicles to understand and perceive surrounding environmental elements, such as vehicles driving on the road, pedestrians on the roadside, obstacles encountered during driving, traffic signs on the road, etc., thereby helping downstream modules Make correct and reasonable decisions and actions. A vehicle with self-driving capabilities is usually equipped with different types of information collection sensors, such as surround-view camera sensors, lidar sensors, millimeter-wave radar sensors, etc., to ensure that the self-driving vehicle can accurately perceive and understand surrounding environment elements. , enabling autonomous vehicles to make correct decisions during autonomous driving. Head

One of the basic tasks for the author's personal understanding of autonomous driving is three-dimensional target detection, and many methods are now implemented based on multi-sensor fusion. So why is multi-sensor fusion needed? Whether it is lidar and camera fusion, or millimeter wave radar and camera fusion, the main purpose is to use the complementary connection between point clouds and images to improve the accuracy of target detection. . With the continuous application of Transformer architecture in the field of computer vision, attention mechanism-based methods have improved the accuracy of fusion between multiple sensors. The two papers shared are based on this architecture and propose novel fusion methods to make greater use of the useful information of their respective modalities and achieve better fusion. TransFusion: Main contribution
