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

deviceYDPI Property

Internet Development Index

Retrieves the actual number of vertical dots per inch (DPI) of the system's screen.

Syntax

[ nActDPI = ] screen.deviceYDPI

Possible Values

nActDPIInteger 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.

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 deviceYDPI property to retrieve the vertical DPI of the screen.

This example uses the deviceYDPI and logicalYDPI properties to calculate the vertical 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 fnScaleFactorY() {
var nScaleFactor = screen.deviceYDPI / screen.logicalYDPI;
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 vertical 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.deviceYDPI == screen.logicalYDPI)
&& (screen.deviceYDPI > constNorm))
{
document.body.style.zoom =
constNorm / screen.logicalYDPI;
}
}
</script>

Applies To

screen

See Also

deviceXDPI, logicalXDPI, logicalYDPI
白河县| 清新县| 西平县| 八宿县| 竹溪县| 静安区| 溧阳市| 崇礼县| 万州区| 武乡县| 南乐县| 堆龙德庆县| 凤山县| 偏关县| 云和县| 金寨县| 清涧县| 玉门市| 泸西县| 华宁县| 芜湖县| 历史| 临夏县| 湘潭市| 鄂托克旗| 金塔县| 霍邱县| 婺源县| 浦东新区| 军事| 江口县| 亚东县| 武宁县| 台东县| 赫章县| 荥阳市| 贺州市| 历史| 乌拉特前旗| 台安县| 札达县|