td,th { text-align: center; }
th { text-align: center; }
thead th, thead td { text-align: center; } tbody th, tbody td { text-align: center; } tfoot th, tfoot td { text-align: center; }
class="centered-cell"> 然后将以下内容添加到样式表中:.centered-cell { text-align: center; }可以将此类添加到表中的任何单元格中,请不要犹豫在任何表格单元格上使用这些样式,您可以在合并的单元格或单个单元格上使用它们,其中的文本将居中。
文章名称:网站制作技术探索之表格的单元格内容元素如何居中
转载来于:http://kswsj.com/view/146423.html其他资讯
- 我们的服务
Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号-18