最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

css - Different dimensions of html-Element between different displays - Stack Overflow

programmeradmin0浏览0评论

For a "browser fingerprint" project at university I want to measure dimensions of different html-elements to get a fingerprint due to different rendering engines and configurations of the browsers and therefore slighty differences in their width and height.

Now I was wondering why the same html-element has different dimensions only due to different displays.

Let me give you an example:

The html-element

    <textarea> </textarea>

has in Edge (version 133) a default size of 175px x 34px (without border, padding, or margin).

But when I print this element on an other screen with DPI-Scaling active the element has slightly other dimensions (regardless of screen resolution), seen in the table below:

DPI-Scaling Factor Width (in px) Hight (in px)
1 175 34
1,5 175,3333 32
2 169 33
2,5 169,2 32,8
3 169 33,3333
发布评论

评论列表(0)

  1. 暂无评论