line-height
line-height: 基准线之间的距离;
半行距:(line-height - fontSize) / 2
把正方形变圆形
border-radius: 边框半径
// border-radius 大于50%都可以 border-radius: 50%;
rem 和 em
rem: root em (root: 根)
Flexbox
display: flex;
// 水平垂直居中
div {
display: flex;
// 主轴方向居中
justify-content: center;
// 垂轴方向居中
align-items: center;
}
// 改变主轴方向
flex-direction: column; // 建议直接写 flex // flex-grow: 增长的量 // flex-shrink: 缩减的量 // flex-basis: 增长和缩减的基准 flex: flex-grow flex-shrink flex-basis; flex-wrap: wrap 自动换行 默认是 no-wrap

京公网安备 11010502036488号