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
3.04k stars 406 forks source link

How to convert `px` to `vw` in `@keyframes`? @keyframes中的px无法转成vw #46

Closed kagaricyan closed 4 years ago

kagaricyan commented 4 years ago

如何配置,可以让keyframes中的px转为vw

dupengdl commented 4 years ago

设置mediaQuery: true可以转换

kagaricyan commented 4 years ago

设置mediaQuery: true可以转换

感谢。

KODerFunk commented 4 years ago

Related issues: #34, #43.

Question:

How to convert px to vw in @keyframes?

Answer:

Set mediaQuery: true to convert.

@dupengdl thanks you!