JSFiddle - React, Tailwind, and code Playground
HTML
<div id='father'>
<div id='son'>
潘小闲 潘小闲
</div>
</div>
CSS
#father {
background-color: red;
margin: 0 auto;
width: 300px;
}
#son {
width: 150px;
margin: 0 auto;
background-color: yellow;
}