鉴于我有这个 HTML 代码:
<div>
<h2>What is Lorem Ipsum?</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
<a href="#">Read more</a>
</div>
和 CSS:
div {
display: flex;
flex-direction: column;
padding: 1em;
border: 1px solid #DDD;
border-radius: 10px;
}
div h2 {
font-size: 1.2307em;
text-align: center;
}
div p {
flex: 1;
margin: 0.7692em 0;
}
如何设置锚的样式以使其水平居中?