1:-父元素设置:display:flex; justify-content:center; align-items:center 2:父元素设置:display:flex;子元素设置:magin:auto