更新脚手架!

This commit is contained in:
Andy Leong
2023-12-29 18:41:59 +08:00
parent f1c3d10fd5
commit c0871a9b1f
29 changed files with 1004 additions and 149 deletions

52
src/styles/global.scss Normal file
View File

@@ -0,0 +1,52 @@
@charset "utf-8";
$red: red;
$green: green;
// DIV宽高
@mixin box($width, $height) {
width: $width;
height: $height;
}
// DIV宽高定位
@mixin pos($width, $height, $left, $top) {
width: $width;
height: $height;
position: absolute;
left: $left;
top: $top;
}
// DIV背景
@mixin bg_pos($src) {
// new URL(`../assets/images/${url}`, import.meta.url).href
background-image: url("../assets/images/" + $src);
background-repeat: no-repeat;
background-size: 100% 100%;
}
// flex居中定位
@mixin flex() {
display: flex;
justify-content: center;
align-items: center;
}
// 全屏样式
@mixin fixed() {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
// flex垂直水平居中
@mixin flexCen() {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}