<div class="flex-container"> <div class="flex-item">根本太帥</div> </div>
.flex-container { display: -webkit-flex; display: flex; width: 250px; height: 200px; background-color: #ccc; } .flex-item { background-color: #f36915; color: white; margin: auto; width: 100px; height: 100px; text-align: center; line-height:100px; }