Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 css 中为媒体打印指定边框宽度时,我应该使用 pt 还是 px?
我基本上只想要发际线
对于打印,您应该使用 pt,因为它是一个绝对单位,而不是基于媒体的分辨率。
一般来说,您应该尽可能使用点或 em 代替像素。原因是点和 em 都随着用户的分辨率或缩放设置缩放,而像素不缩放。在许多较大的高清或宽屏显示器上,单个像素太小而无法可靠地用于放置。
发际线只用px
px