What's dp (density independent pixels) units with CSS?

前端 未结 8 1340
陌清茗
陌清茗 2020-12-23 10:39

For Android, people recommend using dp (density independent pixels) measurements for UI elements, and there are conventions that exist such as using 48dp for a

8条回答
  •  心在旅途
    2020-12-23 11:36

    What about a interface based on rem units?

    I'm not experienced enough on the matter to confirm, but I think you could make some math based on the viewport size to apply a font-size in the root element and the entire interface would adjust accordingly. This stuff is a bit of witchcraft to me yet.

提交回复
热议问题