根据尺寸适配
<style lang="scss"> //适配大屏3840,可以是区间 @media screen and (min-width: 3840px){ $oneVw: 21.6; @function getvw($data) { @return $data/$oneVw * 1vh; } .main { height: getvw(480); } } </style>
根据宽高比例适配
<style lang="scss"> @media screen and (min-aspect-ratio:16/32){ $oneVw: 10.8; @function getvw($data) { @return $data/$oneVw * 1vh; } .main { height: getvw(480); } } </style>
标签:方案,oneVw,适配,data,大屏,height,getvw From: https://www.cnblogs.com/angia/p/17467317.html