【自用】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;
		}
	}
}
相关推荐
孤水寒月3 小时前
基于HTML的悬窗可拖动记事本
前端·css·html
祝余呀3 小时前
html初学者第一天
前端·html
耶啵奶膘5 小时前
uniapp+firstUI——上传视频组件fui-upload-video
前端·javascript·uni-app
视频砖家6 小时前
移动端Html5播放器按钮变小的问题解决方法
前端·javascript·viewport功能
lyj1689976 小时前
vue-i18n+vscode+vue 多语言使用
前端·vue.js·vscode
racerun7 小时前
小程序导航设置更多内容的实现方法
小程序
说私域7 小时前
基于开源AI智能名片链动2+1模式S2B2C商城小程序的超级文化符号构建路径研究
人工智能·小程序·开源
mg6687 小时前
微信小程序入门实例_____快速搭建一个快递查询小程序
微信小程序·小程序
小白变怪兽8 小时前
一、react18+项目初始化(vite)
前端·react.js
ai小鬼头8 小时前
AIStarter如何快速部署Stable Diffusion?**新手也能轻松上手的AI绘图
前端·后端·github