logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

HTML元素的水平/垂直居中方式(简单代码和图)

1.水平居中text-align:center;在没有浮动的情况下,我们可以让需要居中的块级元素设为inline/inline-block,然后在其父元素上添加text-aline:center;即可。如果想要居中的块级元素是内联元素(span,img,a等),直接在其父元素上添加text-align:center;即可。.father{width: 200px;height: 200px;bac

#css#html5#html
暂无文章信息