您可以使用以下方法将 p 元素居中:1、绝对定位居中(最常用、好用)2、负margin居中(传统方法)3、margin固定宽高居中4、flex居中5、transform居中6、table-cell居中7、不确定宽高居中(绝对定位百分数)