【自用】uniapp全局统一样式scss管理

【自用】uniapp全局统一样式scss管理

uniapp移动端全局common.scss样式统一类名管理

css 复制代码
page {
	background: #F7F7F7;
}

view {
	box-sizing: border-box;
}

.b-btn {
	width: 640rpx;
	height: 92rpx;
	background: linear-gradient(141deg, #3167F1 0%, #31A1F1 100%);
	border-radius: 100rpx 100rpx 100rpx 100rpx;
	font-size: 32rpx;
	font-family: PingFang SC-Medium, PingFang SC;
	font-weight: 500;
	color: #FFFFFF;
	display: flex;
	justify-content: center;
	align-items: center;
}
.custom_style {
		color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;

		&_icon {
			background-color: #ffffff;
			font-size: 80rpx;
			width: 120rpx;
			height: 120rpx;
			border-radius: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: -40rpx;
			@include flex-c-c;
			
			image{
				width: 65%;
				height: 65%;
			}
		}
	}


.tCenter {
	text-align: center;
}

.flex-1 {
	flex: 1;
}

.flex {
	display: flex;
}

.wrap {
	flex-wrap: wrap;
}

.column {
	flex-direction: column;
}

.row {
	flex-direction: row;
}

.jEnd {
	justify-content: flex-end;
}

.jStart {
	justify-content: flex-start;
}

.jEvenly {
	justify-content: space-evenly;
}

.aStart {
	align-items: flex-start;
}

.center {
	display: flex;
	justify-content: center;
	align-items: center;
}

.aCenter {
	display: flex;
	align-items: center;
}

.jCenter {
	display: flex;
	justify-content: center;
}

.jBetween {
	display: flex;
	justify-content: space-between;
}

.line1 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	text-overflow: ellipsis;
	-webkit-line-clamp: 1;
	overflow: hidden;
}

.line2 {
	overflow: hidden;
	-webkit-line-clamp: 2;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-box-orient: vertical;
}

.line3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}
.fc{
	display: flex;
	flex-direction: column;
}
.w-100{
	width: 100%;
}
.fff{
	background-color: #FFFFFF;
}

// 定义字体(rpx)单位
@for $i from 9 through 40 {

	.u-font-#{$i},
	.fs#{$i} {
		font-size: $i + rpx;
	}
}

// 宽高
@for $i from 0 through 500 {
	.w#{$i} {
		width: $i + rpx !important;
	}

	.h#{$i} {
		height: $i + rpx !important;
	}
}

@for $i from 0 through 201 {
	.m#{$i} {
		margin: $i + rpx !important;
	}

	.p#{$i} {
		padding: $i + rpx !important;
	}

	@each $short, $long in l left, t top, r right, b bottom {
		.m#{$short}#{$i} {
			margin-#{$long}: $i + rpx !important;
		}

		.p#{$short}#{$i} {
			padding-#{$long}: $i + rpx !important;
		}
	}
}
相关推荐
二十雨辰4 分钟前
[JS]面向对象ES6
前端·javascript·ajax
GDAL5 分钟前
css之transform-origin
前端·css
疯狂创作者7 分钟前
十款绚丽的前端 CSS 菜单导航动画
前端·css
秃头女孩y30 分钟前
前端之CSS篇--面试题总结
前端·css
2402_8575834931 分钟前
定制化的 CSS 魔法:WebKit 处理 CSS 变量的深度解析
前端·css·webkit
椰果uu33 分钟前
实习手记(2):前端菜鸟的摸鱼与成长
前端·前端实习
一只理智恩38 分钟前
React中的useCallback
前端·javascript·react.js
@PHARAOH39 分钟前
HOW - React Router v6.x Feature 实践(react-router-dom)
前端·react.js·前端框架
林强18142 分钟前
React Redux使用@reduxjs/toolkit的hooks
前端·javascript·react.js
不掉头发的程序猿宝宝1 小时前
Node.js_fs模块
前端