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.
每个人似乎都使用像素来确定设备的屏幕尺寸,但这不再是一个好习惯。您可以使用 bootstrap 创建响应式网站,但在全高清屏幕上会失败,因为很多像素不再意味着大屏幕。
我的例子:在更大的屏幕上,我不希望网站占据整个屏幕,而在较小的屏幕上我愿意。简单的解决方案是使用最大宽度,但如果设备具有全高清屏幕,则它不起作用,因为它很小,有很多像素。
@media screen and (min-resolution: 300dpi) { //styling which will be applied >= 300dpi }
来源 1
来源 2