方法一:
.demo {
width: 220px;
height: 52px;
border: 1px solid red;
font-size: 13px;
}
.demo-flex {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
Real Estate/Construction,Building Management/Decoration
方法二:
.demo {
width: 220px;
height: 52px;
font-size: 13px;
border: 1px solid red;
display: flex;
align-items: center;
justify-content: center;
}
Real Estate/Construction,Building Management/Decoration
兼容 IE 7 以上版
.demo3 {
display: table-cell;
width: 220px;
height: 52px;
border: 1px solid red;
font-size: 13px;
vertical-align: middle;
}
Real Estate/Construction,Building Management/Decoration
本作品采用《CC 协议》,转载必须注明作者和本文链接
www.haowuliaoa.com