css样式中怎么能让一行字水平居中显示

破碎迷离 1个月前 已收到1个回答 举报

傷節奏 1星

共回答了162个问题采纳率:90.2% 评论

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<style>标签中,输入css代码:p{text-align:center}。

3、浏览器运行index.html页面,此时p标签内的文字成功被水平居中显示。

6小时前

33
可能相似的问题

热门问题推荐

Copyright © 2024 微短问答 All rights reserved. 粤ICP备2021119249号 站务邮箱 service@wdace.com