我是靠谱客的博主 合适吐司,这篇文章主要介绍flex样式,现在分享给大家,希望可以做个参考。

// 两端对齐

.flex-row-between {

  display: flex;

  flex-direction: row;

  justify-content: space-between;

}

// 多行水平居中

.flex-column-center {

  display: flex;

  flex-direction: column;

  align-items: center;

}

// 上下两端对齐

.flex-column-between {

  display: flex;

  flex-direction: column;

  justify-content: space-between;

}

// 左边起始点

.flex-row-start {

  display: flex;

  flex-direction: row;

  justify-content: flex-start;

}

// 上下左右居中

.flex-center {

  display: flex;

  justify-content: center;

  align-items: center;

}

// 只处理上下居中

.flex-v-center {

  display: flex;

  align-items: center;

}

// 处理换行

.flex-w-center {

  display: flex;

  flex-wrap: wrap;

}

// 左右两端对齐上下居中

.flex-b-center {

  display: flex;

  justify-content: space-between;

  align-items: center;

}

// 纵向上下左右居中

.flex-a-center {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

}

// 横向上下居中末端对齐

.flex-h-flexend {

  display: flex;

  align-items: center;

  justify-content: flex-end;

}

// 上下布局

.flex-h-stretch {

  display: flex;

  flex-direction: column;

  align-items: stretch;

  justify-content: stretch;

}

// 单行省略号

.ellipsis {

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}

最后

以上就是合适吐司最近收集整理的关于flex样式的全部内容,更多相关flex样式内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(137)

评论列表共有 0 条评论

立即
投稿
返回
顶部