display-dpi

How to access screen display’s DPI settings via javascript? [duplicate]

…衆ロ難τιáo~ 提交于 2019-11-26 10:31:03
问题 This question already has answers here : Detecting the system DPI/PPI from JS/CSS? (12 answers) Closed 2 years ago . Is there a way to access the screen display\'s DPI settings in a Javascript function? I am trying to position a HTML panel on the page and when the user\'s DPI is set to large (120), it throws the position off. I need to be able to know what the DPI is so I can adjust the position accordingly. 回答1: Firstly, to help with the possible (and very common) confusion with the term DPI