共用方式為


Internet Explorer and HTML Controls Exception

Send Feedback

HTML layouts are an exception to the rule that all pixel coordinates should be scaled. On a Windows Mobile-based Pocket PC, Internet Explorer interprets pixel coordinates in HTML specifically as 96-dpi pixels. Although it is always best to use relative coordinates in HTML, such as defining a table column as 50 percent of the table width, if you are currently using pixel metrics, they will continue to produce the same layout at higher DPI.

The same is not true for Windows Mobile-based Smartphones, on these devices, pixel coordinates will continue to refer to actual pixels. For this reason, a high-resolution Windows Mobile-based Smartphone will display more Web page content and possibly render the Web page differently than would a low-resolution Windows Mobile-based Smartphone.

The screen size can be determined on the device side by means of the window.screen.width and window.screen.height Microsoft® JScript® development software variables. If you would like to know the device's screen size on the Web server side, you can query the HTTP_UA_PIXELS header.

See Also

Developing DPI Aware Applications | High DPI Display

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.