uniapp公共css

css 复制代码
/* 弹性布局 */
.flex{
	display: flex;
}
.a-c{
	align-items: center;
}
.a-s{
	align-items: flex-start;
}
.a-e{
	align-items: flex-end;
}
.j-c{
	justify-content: center;
}
.j-sb{
	justify-content: space-between;
}
.j-s{
	justify-content: flex-start;
}
.j-e{
	justify-content: flex-end;
}
.j-sa{
	justify-content: space-around;
}
/* 文本对齐 */
.t-c{
	text-align: center;
}
.t-l{
	text-align: left;
}
.t-r{
	text-align: right;
}
/* 文本超出省略号 */
.o-1{
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap;
}
.o-2{
	display:-webkit-box;
	-webkit-box-orient:vertical;
	-webkit-line-clamp:2;
	overflow:hidden;
}
.o-3{
	display:-webkit-box;
	-webkit-box-orient:vertical;
	-webkit-line-clamp:3;
	overflow:hidden;
}
/* 文字效果 */
.bold{
	font-weight: bold;
}
.text-u{
	text-decoration: underline;
}
.text-l{
	text-decoration: line-through;
}
/* 字号 */
.f18{
	font-size: 18rpx;
}
.f20{
	font-size: 20rpx;
}
.f22{
	font-size: 22rpx;
}
.f24{
	font-size: 24rpx;
}
.f28{
	font-size: 28rpx;
}
.f30{
	font-size: 30rpx;
}
.f32{
	font-size: 32rpx;
}
.f34{
	font-size: 34rpx;
}
.f36{
	font-size: 36rpx;
}

字体颜色和背景颜色根据项目ui自行设定,后续有遇到在增加

相关推荐
wing981 分钟前
Vue3 接入 Google 登录:极简教程
前端·vue.js·google
weixin199701080167 分钟前
货铺头商品详情页前端性能优化实战
java·前端·python
new code Boy44 分钟前
NestJS、Nuxt.js 和 Next.js
前端·后端
进击切图仔1 小时前
执行 shell 脚本 5 种方式对比
前端·chrome
局i1 小时前
React 简单地图组件封装:基于高德地图 API 的实践(附源码)
前端·javascript·react.js
执行部之龙1 小时前
AI对话平台核心技术解析
前端
yuki_uix1 小时前
防抖(Debounce):从用户体验到手写实现
前端·javascript
HelloReader1 小时前
Flutter 进阶 UI搭建 iOS 风格通讯录应用(十一)
前端
张元清1 小时前
每个 React 开发者都需要的 10 个浏览器 API Hooks
前端·javascript·面试
HelloReader1 小时前
Flutter ListenableBuilder让界面自动响应数据变化(十)
前端