postcss-px-to-viewport is used for adaptation in vue. Configure as follows
postcss: {
plugins: [
autoprefixer(),
pxtovw({
viewportWidth: 750,
viewportHeight: 1334,
unitPrecision: 3,
viewportUnit: "vw",
selectorBlackList: [".ignore", ".hairlines"],
minPixelValue: 1,
mediaQuery: false
})
]
}
but I found that the effect of iphone6/7/8 is exactly half of what I expected.
.scroll-wrapper{
height: 500px;
border: 1px solid rgba(0, 0, 0, 0.1);
}
is there something wrong with my configuration, or is it wrong on the Internet?