As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。




7年前关闭。




任何人都可以提供一些技巧,以便在查看/调整到移动视口(viewport)时如何有效地将CSS缩小为适当的文档布局?

我记得读过关于在CSS盒子上使用百分比的信息,但是尝试这种方法时,我无法正确堆叠东西。

任何帮助将是巨大的!

最佳答案

您应该阅读CSS Media Queries。这些允许您为屏幕的某些宽度,高度和纵横比之上/之下设置条件样式。

正如其他人提到的那样,有许多响应式网格框架(请参阅jmeas的答案)可以为您解决此问题。是否使用它们取决于部署要求以及要自定义布局的数量。

关于javascript - 使CSS缩放到移动 View 的最佳方法,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15814185/

10-12 07:39
查看更多