CSS:是否广泛支持视图高度(vh)和视图宽度(vw)单位? [英] CSS: Are view height (vh) and view width (vw) units widely supported?

查看:632
本文介绍了CSS:是否广泛支持视图高度(vh)和视图宽度(vw)单位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用100vh垂直居中一个div与行高。 这个网站支持vh和vw约70%,这是一个公平的评估?您会建议在构建网站时使用视口单元吗?我知道这有点主观,我只是寻找来自更有经验的网络开发人员的意见比我。

I'm using 100vh to center a div vertically with line-height. This site puts support for vh and vw at around 70%, is that a fair assessment? Would you recommend using viewport units when building a site? I know this is a bit subjective, I'm just looking for opinions from more experienced web developers than I.

编辑:感谢您的输入每个人,我想要在移动上看起来不错,所以我想我不得不放弃。

Thanks for the input everyone, I do want it to look good on mobile, so I guess I'll have to forgo vh.

推荐答案

统计显然是一个公平的评估,在我的观点。

The statistic is clearly and it is a fair assessment, in my point of view.

我认为你的决定必须由你决定。如果你想使用最先进的技术来保护你的网站,但意识到目前有一些失败,那么伟大的,去吧。

I think the decision has to be made by you. If you want to future-proof your website using the latest greatest technology, but are aware that there are currently some downfalls, then great, go for it.

如果你是不准备再投入一点点到您的在线存在,然后坚持旧的方式,这是没有错误的。

If you are not prepared to invest a little more into your online presence, then stick to the old way, which is in no means wrong.

编辑:当我想创建一个响应设计我首先开始为移动设备开发,然后创建桌面版本,以确保我的视口都能正常工作,因为移动支持在某些点(特别是vmax)缺乏。但是关于这个,你可以问50个人,他们都会说别的东西很好的机会。

When i want to create a responsive design I start developing for Mobile Devices first and then create the Desktop Version, to ensure that my viewports all work correctly, since the Mobile support is lacking at some points(especially vmax). BUT about this you could ask 50 guys and the chances that they all will say something else are pretty good.

这篇关于CSS:是否广泛支持视图高度(vh)和视图宽度(vw)单位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆