first commit
This commit is contained in:
16
src/styles/screen.scss
Normal file
16
src/styles/screen.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
@use "sass:math";
|
||||
|
||||
//默认设计稿的宽度
|
||||
$designWidth:3840;
|
||||
//默认设计稿的高度
|
||||
$designHeight:1080;
|
||||
|
||||
//px转为vw的函数
|
||||
@function vw($px) {
|
||||
@return math.div($px , $designWidth) * 100vw;
|
||||
}
|
||||
|
||||
//px转为vh的函数
|
||||
@function vh($px) {
|
||||
@return math.div($px , $designHeight) * 100vh;
|
||||
}
|
||||
Reference in New Issue
Block a user