内容超出时保持外容器不变形 文字内容不换行省略号展示
//隐藏
overflow: "hidden",
//省略号
textOverflow:"ellipsis",
//不换行
whiteSpace: "nowrap"
块级元素垂直居中
#total{
width:100%;
height:100%;
background-color: #00d6b2;
text-align: center;
display: flex;
}
.parent {
position: relative;
width:400px;
height:400px;
margin: 0 auto;
align-self:center;
z-index:1000;
}
父级 text-align: center;
子级 align-self:center;