evrone / postcss-px-to-viewport

A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.
https://evrone.com/postcss-px-viewport
MIT License
3k stars 405 forks source link

If I have portrait and landscape screen, how do I determine which horizontal screen vertical screen with a viewportWidth? #16

Closed xuweimeng closed 5 years ago

xuweimeng commented 5 years ago

比如,一个项目里同时存在横屏和竖屏两种页面,我怎么判断横屏时用横屏的viewportWidth,竖屏用竖屏的viewportWidth?

KODerFunk commented 5 years ago

@xuweimeng, 我们已经发布了1.1.0版本,其中有一个解决方案! 选项landscapelandscapeUnitlandscapeWidth。 它像一个奇迹!