[英]Web layout and size units
I have problem with understanding how to create a website's layout. 我在了解如何创建网站布局时遇到问题。 If I use
vh
and vw
units for my body
height/width, I'm unable to zoom in/out. 如果我将
vh
和vw
单位用作body
身高/宽度,则无法放大/缩小。 I also heard about problems with viewport units in mobile browsers. 我也听说过移动浏览器中的视口单元存在问题。
How should a website's layout be made. 网站布局应如何进行。 Using only percentages and pixels + media queries?
仅使用百分比和像素+媒体查询?
I'd recommend you to look at the Flexbox and the Grid as they are the future of responsive web development. 我建议您看一下Flexbox和Grid,因为它们是响应式Web开发的未来。 Besides, a good practice is to use a combination of both,
px
and %
, alongside @media
queries. 此外,一个好的做法是将
px
和%
结合使用,同时使用@media
查询。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.