您的位置:首页 > 技术中心 > 前端框架 >

css表格中如何居中

时间:2022-02-11 16:38

css表格居中的方法:首先新建html文件,并在【index.html】中的【<style>】标签中输入css代码;然后浏览器运行【index.html】页面即可。

本教程操作环境:windows7系统、css3版,DELL G3电脑。

css表格居中的方法:

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

038282ad1c2015a2deade0599e0f543.png

2、在index.html中的<style>标签中,输入css代码:

body {text-align: center;} table {margin: auto;}

091aad0330cec4e3c4539381c010edc.png

3、浏览器运行index.html页面,此时成功用css让表格居中了。

ed9d02665aee255dff6ee3f1fe19e2d.png

相关教程推荐:CSS视频教程

以上就是css表格中如何居中的详细内容,更多请关注gxlsystem.com其它相关文章!

本类排行

今日推荐

热门手游