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

前端 未结 8 1323
陌清茗
陌清茗 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:43

    In CSS3 it may be more accurate to say that the web doesn't have Android's px. The spec for CSS3's px says this:

    pixels; 1px is equal to 1/96th of 1in

    px might be the measurement you want, in the future.

提交回复
热议问题