一推网

当前位置: 首页 > 知识问答 > HTML的表格样式

知识问答

HTML的表格样式

2026-11-22 19:53:21 来源:互联网转载

给大家分享一个好看的html的表格样式,这个表格每个格子里都有背景图,

首先你需要下载俩张图,

cell-blue.jpg

cell-grey.jpg

命名为cell-blue.jpg和cell-grey.jpg

拷贝下面的代码到你想要的地方,记得修改图片url

<!-- CSS goes in the document HEAD or added to your external stylesheet --><style type="text/css">table.imagetable {font-family: verdana,arial,sans-serif;font-size:11px;color:#333333;border-width: 1px;border-color: #999999;border-collapse: collapse;}table.imagetable th {background:#b5cfd2 url(&#39;cell-blue.jpg&#39;);border-width: 1px;padding: 8px;border-style: solid;border-color: #999999;}table.imagetable td {background:#dcddc0 url(&#39;cell-grey.jpg&#39;);border-width: 1px;padding: 8px;border-style: solid;border-color: #999999;}</style><!-- Table goes in the document BODY --><table class="imagetable"><tr><th>Info Header 1</th><th>Info Header 2</th><th>Info Header 3</th></tr><tr><td>Text 1A</td><td>Text 1B</td><td>Text 1C</td></tr><tr><td>Text 2A</td><td>Text 2B</td><td>Text 2C</td></tr></table>

需要的朋友可以直接拿去用,更多精彩请关注本站其它相关文章!

立即学习“前端免费学习笔记(深入)”;

相关阅读:

class与id有什么区别

怎么让网页变黑白色

HTML网页字体大小的设置

css表格样式大全

上一篇:总结Python中len()函数的使用实例

下一篇:存储处理国家秘密的计算机实行什么保护