最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

logicalXDPI Property

Internet Development Index

Retrieves the normal number of horizontal dots per inch (DPI) of the system's screen.

Syntax

[ nNormDPI = ] screen.logicalXDPI

Possible Values

nNormDPIInteger that receives the DPI.

The property is read-only. The property has no default value.

Remarks

On most systems, there is no difference between horizontal and vertical DPI. The normal DPI on most systems is 96.

When Internet Explorer is adjusting the scale of the screen, the value of this property does not equal the value of the deviceXDPI property.

For information about how Internet Explorer 6 and later can adjust the scale of the display on screens with higher-than-normal DPI, see Adjusting Scale for Higher DPI Screens.

Examples

The following examples use the logicalXDPI property to retrieve the normal horizontal DPI of the screen.

This example uses the deviceXDPI and logicalXDPI properties to calculate the horizontal scale factor that Internet Explorer is applying. The function in this example returns 1 if Internet Explorer is not adjusting the scale of the screen.

<script>
function fnScaleFactorX() {
var nScaleFactor = screen.deviceXDPI / screen.logicalXDPI;
return nScaleFactor;
}
</script>

This example uses the zoom property of the BODY element to adjust the scale of the document "manually" if Internet Explorer is not adjusting the scale of the screen and the user's horizontal DPI is higher than normal. This is a simple but imprecise way to make a document look the same on higher resolution screens. You can achieve finer control over the layout of your documents by modifying the properties of individual elements or groups of elements.

<script>
// change layout on HighDPI screens when IE not scaling
function fnScaleManually()
{
// normal DPI
var constNorm = 96;
// scaling is off and DPI higher than normal
if ((screen.deviceXDPI == screen.logicalXDPI)
&& (screen.deviceXDPI > constNorm))
{
document.body.style.zoom =
constNorm / screen.logicalXDPI;
}
}
</script>

Applies To

screen

See Also

deviceXDPI, deviceYDPI, logicalYDPI
台前县| 宝坻区| 陵川县| 沂南县| 嘉鱼县| 绵竹市| 宁强县| 新津县| 博爱县| 常德市| 鸡东县| 孝义市| 泽普县| 平果县| 上栗县| 连南| 彰化市| 江油市| 茌平县| 壶关县| 理塘县| 寻乌县| 万荣县| 大英县| 石家庄市| 同心县| 临朐县| 米脂县| 静安区| 新津县| 襄汾县| 东明县| 姚安县| 普兰店市| 乐业县| 定州市| 灵璧县| 阿坝县| 余姚市| 长沙县| 赫章县|