css如何实现span在div中水平居中

日期:2019-07-12 09:45:30 人气:1

css如何实现span在div中水平居中

需要准备的材料分别有:电脑、浏览器、html编辑器。 1、首先,打开html编辑器,新建html文件,例如:index.html。 2、在index.html中的标签中,输入css代码:div {width: 200px; border: 1px solid blue; text-align: center}。 3、浏览器运行index.html页面,此时span在div中成功水平居中了。
    A+
热门评论