首页 前端知识 css封装

css封装

2024-07-08 09:07:04 前端知识 前端哥 43 305 我要收藏

.static {
position: static
}

.fixed {
position: fixed
}

.absolute {
position: absolute
}

.relative {
position: relative
}

.sticky {
position: -webkit-sticky;
position: sticky
}

/* 超出显示… 1行|2行|3行|删除线|下划线 */
.text-h {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap
}

.text-hs {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
word-wrap: break-word;
-webkit-box-orient: vertical
}

.text-hss {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
word-wrap: break-word;
-webkit-box-orient: vertical
}

.text-d {
text-decoration: line-through
}

.text-u {
text-decoration: underline
}

.text-left {
text-align: left
}

.text-center {
text-align: center
}

.text-right {
text-align: right
}

.text-justify {
text-align: justify
}

.text-start {
text-align: start
}

.text-end {
text-align: end
}

.z-0 {
z-index: 0
}

.z-10 {
z-index: 10
}

.z-20 {
z-index: 20
}

.z-30 {
z-index: 30
}

.z-40 {
z-index: 40
}

.z-50 {
z-index: 50
}

.box-border {
box-sizing: border-box
}

.box-content {
box-sizing: content-box
}

.block {
display: block
}

.inline-block {
display: inline-block
}

.inline {
display: inline
}

.flex {
display: flex
}

/* 靠左|靠右并顺序相反|垂直|垂直并顺序相反 */
.flex-row {
flex-direction: row
}

.flex-row-reverse {
flex-direction: row-reverse
}

.flex-col {
flex-direction: column
}

.flex-col-reverse {
flex-direction: column-reverse
}

/* 超出换行|不换行|换行并相反顺序 */
.flex-wrap {
flex-wrap: wrap
}

.flex-wrap-reverse {
flex-wrap: wrap-reverse
}

.flex-nowrap {
flex-wrap: nowrap
}

/* 左上|左下|居中| */

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

.items-end {
align-items: flex-end
}

.items-center {
align-items: center
}

/*靠左|靠右|居中|两端对齐|均匀排列 */
.justify-normal {
justify-content: normal
}

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

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

.justify-center {
justify-content: center
}

.justify-between {
justify-content: space-between
}

.justify-around {
justify-content: space-around
}

.mt0 {
margin-top: 0
}

.mt1 {
margin-top: 10rpx
}

.mt2 {
margin-top: 20rpx
}

.mt3 {
margin-top: 30rpx
}

.mt4 {
margin-top: 40rpx
}

.mt5 {
margin-top: 50rpx
}

.mb0 {
margin-bottom: 0
}

.mb1 {
margin-bottom: 10rpx
}

.mb2 {
margin-bottom: 20rpx
}

.mb3 {
margin-bottom: 30rpx
}

.mb36 {
margin-bottom: 36rpx
}

.mb4 {
margin-bottom: 40rpx
}

.mb5 {
margin-bottom: 50rpx
}

.ml0 {
margin-left: 0
}

.ml05 {
margin-left: 5rpx
}
.ml1 {
margin-left: 10rpx
}

.ml2 {
margin-left: 20rpx
}

.ml3 {
margin-left: 30rpx
}

.ml4 {
margin-left: 40rpx
}

.ml5 {
margin-left: 50rpx
}

.mr0 {
margin-right: 0
}

.mr1 {
margin-right: 10rpx
}

.mr2 {
margin-right: 20rpx
}

.mr3 {
margin-right: 30rpx
}

.mr4 {
margin-right: 40rpx
}

.mr05 {
margin-right: 5rpx
}

.mr5 {
margin-right: 50rpx
}

.pt0 {
padding-top: 0
}

.pt1 {
padding-top: 10rpx
}

.pt2 {
padding-top: 20rpx
}

.pt3 {
padding-top: 30rpx
}

.pt4 {
padding-top: 40rpx
}

.pt5 {
padding-top: 50rpx
}

.pb0 {
padding-bottom: 0
}

.pb1 {
padding-bottom: 10rpx
}

.pb2 {
padding-bottom: 20rpx
}

.pb3 {
padding-bottom: 30rpx
}

.pb4 {
padding-bottom: 40rpx
}

.pb5 {
padding-bottom: 50rpx
}

.pl0 {
padding-left: 0
}

.pl1 {
padding-left: 10rpx
}

.pl2 {
padding-left: 20rpx
}

.pl3 {
padding-left: 30rpx
}

.pl4 {
padding-left: 40rpx
}

.pl5 {
padding-left: 50rpx
}

.pr0 {
padding-right: 0
}

.pr1 {
padding-right: 10rpx
}

.pr2 {
padding-right: 20rpx
}

.pr3 {
padding-right: 30rpx
}

.pr4 {
padding-right: 40rpx
}

.pr5 {
padding-right: 50rpx
}

.f18 {
font-size: 18rpx
}

.f20 {
font-size: 20rpx
}

.f22 {
font-size: 22rpx
}

.f24 {
font-size: 24rpx
}

.f26 {
font-size: 26rpx
}

.f28 {
font-size: 28rpx
}

.f30 {
font-size: 30rpx
}

.f32 {
font-size: 32rpx
}

.f34 {
font-size: 34rpx
}

.f36 {
font-size: 36rpx
}

.f40 {
font-size: 40rpx
}

.f48 {
font-size: 48rpx
}

.f60 {
font-size: 60rpx
}

.fw {
font-weight: 600
}

.fw-4 {
font-weight: 400
}

.fw-5 {
font-weight: 500
}

.fw-8 {
font-weight: 800;
}

转载请注明出处或者链接地址:https://www.qianduange.cn//article/13849.html
标签
评论
发布的文章

html左右两栏布局实现

2024-08-04 00:08:50

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!