欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

瀏覽器縮放檢測(cè)的js代碼

 更新時(shí)間:2014年09月28日 23:19:13   作者:99js  
這篇文章主要介紹了瀏覽器縮放檢測(cè)的js代碼,需要的朋友可以參考下

測(cè)試代碼

http://jsbin.com/dipijeqi/11


效果:


chrome

復(fù)制代碼 代碼如下:

window.devicePixelRatio : 2  (準(zhǔn)確)
screen.deviceXDPI / screen.logicalXDPI : NaN
window.outerWidth / window.innerWidth : 2
document.documentElement.offsetHeight / window.innerHeight : 0.020618556701030927 (有相關(guān)性)
window.top.outerWidth / window.top.innerWidth : 2

ff

復(fù)制代碼 代碼如下:

window.devicePixelRatio : 1.5 (準(zhǔn)確)
screen.deviceXDPI / screen.logicalXDPI : NaN
window.outerWidth / window.innerWidth : 1.0114583333333333
document.documentElement.offsetHeight / window.innerHeight : 0.023391812865497075  (有相關(guān)性)
window.top.outerWidth / window.top.innerWidth : 1.0114583333333333

ie 8

復(fù)制代碼 代碼如下:

window.devicePixelRatio : undefined
screen.deviceXDPI / screen.logicalXDPI : 1.5416666666666667 (大致準(zhǔn)確)
window.outerWidth / window.innerWidth : NaN
document.documentElement.offsetHeight / window.innerHeight : NaN
window.top.outerWidth / window.top.innerWidth : NaN

ie11

復(fù)制代碼 代碼如下:

window.devicePixelRatio : 1.5 (準(zhǔn)確)
screen.deviceXDPI / screen.logicalXDPI : 1.5
window.outerWidth / window.innerWidth : 1.0084033613445377
document.documentElement.offsetHeight / window.innerHeight : 0.02203856749311295 (有相關(guān)性)
window.top.outerWidth / window.top.innerWidth : 1.0084033613445377

ie10

復(fù)制代碼 代碼如下:

window.devicePixelRatio : undefined
screen.deviceXDPI / screen.logicalXDPI : 1.5 (準(zhǔn)確)
window.outerWidth / window.innerWidth : 1.0084033613445377
document.documentElement.offsetHeight / window.innerHeight : 1
window.top.outerWidth / window.top.innerWidth : 1.0084033613445377

ie9

復(fù)制代碼 代碼如下:

window.devicePixelRatio : undefined
screen.deviceXDPI / screen.logicalXDPI : 1.5 (準(zhǔn)確)
window.outerWidth / window.innerWidth : 1.0084033613445377
document.documentElement.offsetHeight / window.innerHeight : 1
window.top.outerWidth / window.top.innerWidth : 1.0084033613445377

360 6.3(完全沒(méi)反應(yīng))

復(fù)制代碼 代碼如下:

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極速瀏覽器

復(fù)制代碼 代碼如下:

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(準(zhǔn)確)

搜狗高速瀏覽器 (完全沒(méi)反應(yīng))

復(fù)制代碼 代碼如下:

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

淘寶瀏覽器

復(fù)制代碼 代碼如下:

window.devicePixelRatio : 1
screen.deviceXDPI / screen.logicalXDPI : NaN
window.outerWidth / window.innerWidth : 2.0710059171597632  (大致準(zhǔn)確)
document.documentElement.offsetHeight / window.innerHeight : 0.022988505747126436
window.top.outerWidth / window.top.innerWidth : 2.0710059171597632

相關(guān)文章

  • uniapp介紹與使用以及小程序?qū)崟r(shí)獲取視頻播放時(shí)間

    uniapp介紹與使用以及小程序?qū)崟r(shí)獲取視頻播放時(shí)間

    這篇文章主要給大家介紹了關(guān)于uniapp介紹與使用以及小程序?qū)崟r(shí)獲取視頻播放時(shí)間的相關(guān)資料,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用uniapp具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2023-02-02
  • bootstrap使用validate實(shí)現(xiàn)簡(jiǎn)單校驗(yàn)功能

    bootstrap使用validate實(shí)現(xiàn)簡(jiǎn)單校驗(yàn)功能

    這篇文章主要為大家詳細(xì)介紹了bootstrap使用validate實(shí)現(xiàn)簡(jiǎn)單校驗(yàn)功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-12-12
  • JavaScript實(shí)現(xiàn)table切換的插件封裝

    JavaScript實(shí)現(xiàn)table切換的插件封裝

    這篇文章主要為大家詳細(xì)介紹了JavaScript實(shí)現(xiàn)table切換的插件封裝,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-10-10
  • Add Formatted Text to a Word Document

    Add Formatted Text to a Word Document

    Add Formatted Text to a Word Document...
    2007-06-06
  • CSS(js)限制頁(yè)面顯示的文本字符長(zhǎng)度

    CSS(js)限制頁(yè)面顯示的文本字符長(zhǎng)度

    限制頁(yè)面顯示的字符長(zhǎng)度,一直被眾多網(wǎng)友傾睬,本人也是一fans利用閑暇時(shí)間搜集整理了一些實(shí)用技巧,需要了解的朋友可以參考下
    2012-12-12
  • 原生JS實(shí)現(xiàn)幾個(gè)常用DOM操作API實(shí)例

    原生JS實(shí)現(xiàn)幾個(gè)常用DOM操作API實(shí)例

    下面小編就為大家?guī)?lái)一篇原生JS實(shí)現(xiàn)幾個(gè)常用DOM操作API實(shí)例。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-01-01
  • js實(shí)現(xiàn)輪播圖效果 純js實(shí)現(xiàn)圖片自動(dòng)切換

    js實(shí)現(xiàn)輪播圖效果 純js實(shí)現(xiàn)圖片自動(dòng)切換

    這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)輪播圖效果,圖片自動(dòng)切換,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-08-08
  • js數(shù)組案例之五子棋游戲

    js數(shù)組案例之五子棋游戲

    這篇文章主要為大家詳細(xì)介紹了js數(shù)組案例之五子棋游戲,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-05-05
  • Bootstrap每天必學(xué)之模態(tài)框(Modal)插件

    Bootstrap每天必學(xué)之模態(tài)框(Modal)插件

    Bootstrap每天必學(xué)之模態(tài)框(Modal)插件,模態(tài)框(Modal)是覆蓋在父窗體上的子窗體。通常,目的是顯示來(lái)自一個(gè)單獨(dú)的源的內(nèi)容,可以在不離開(kāi)父窗體的情況下有一些互動(dòng)。子窗體可提供信息、交互等,感興趣的小伙伴們可以參考一下
    2016-04-04
  • JavaScript中三種常見(jiàn)的排序方法

    JavaScript中三種常見(jiàn)的排序方法

    本篇文章主要介紹了JavaScript中三種常見(jiàn)的排序方法:快速排序、插入排序、冒泡排序,具有很好的參考價(jià)值,下面跟著小編一起來(lái)看下吧
    2017-02-02

最新評(píng)論