【自用】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;
		}
	}
}
相关推荐
拉不动的猪40 分钟前
都25年啦,还有谁分不清双向绑定原理,响应式原理、v-model实现原理
前端·javascript·vue.js
烛阴1 小时前
Python枚举类Enum超详细入门与进阶全攻略
前端·python
孟孟~1 小时前
npm run dev 报错:Error: error:0308010C:digital envelope routines::unsupported
前端·npm·node.js
孟孟~1 小时前
npm install 报错:npm error: ...node_modules\deasync npm error command failed
前端·npm·node.js
狂炫一碗大米饭1 小时前
一文打通TypeScript 泛型
前端·javascript·typescript
轩1151 小时前
实现仿中国婚博会微信小程序
微信小程序·小程序
wh_xia_jun1 小时前
在 Spring Boot 中使用 JSP
java·前端·spring boot
二十雨辰1 小时前
[HTML5]快速掌握canvas
前端·html
tingkeiii2 小时前
【react+antd+vite】优雅的引入svg和阿里巴巴图标
前端·react.js·前端框架
清幽竹客2 小时前
vue-18(使用 Vuex 插件实现高级功能)
前端·vue.js·前端框架·vue