/ 软件 / 118阅

Flex实现两端对齐

从前:

.block {
  display: inline-block;
}
.block-left {
  display: block;
  float: left;
}
.block-right {
  display: block;
  float: right
}
.clearfix::after {
  content: '';
  display: none;
  clear: both;
  height: 0;
}

如今:

.block {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
.block-left {
  display: inline
}
.block-right {
  display: inline
}
# 写于三年前,改于二年前
           

0

  1. This post has no comment yet

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注