html table样式的设计 表格边框修饰

html 复制代码
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>今日小说排行榜</title>
<style>
table {
  border-collapse: collapse;
  border: 4px double red; /* 表格外边是双线 */
  width:100%;
}

th,td {
  border: 1px dashed green; /* 单元格边框为虚线 */
  border-right:2px dashed green;
  padding: 10px; /* 设置单元格内边距 */
}
caption{ 
font-size:24px;
font-weight: bold;
}
</style>
</head>

<body>
<table width="200" border="1">
<caption>今日小说排行榜</caption>
  <tr>
    <th>排名</th>
    <th>关键词</th>
    <th>趋势</th>
    <th>今日搜索</th>
    <th>最近7日</th>
    <th>相关链接</th>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
相关推荐
剪刀石头布啊12 分钟前
js能被遍历的集合有哪些特征,为何能被遍历
前端
剪刀石头布啊13 分钟前
js解构
前端
剪刀石头布啊18 分钟前
防抖功能的逐步递进
前端
剪刀石头布啊23 分钟前
对象的大小比较与面向对象思考
前端
最爱老式锅包肉3 小时前
《HarmonyOS技术精讲-ArkWeb》桥接两岸:JSBridge原生与Web互调
前端·华为·harmonyos
IT_陈寒3 小时前
闭包陷阱让我加了两天班,JavaScript你真行
前端·人工智能·后端
踩着两条虫3 小时前
可视化 vs 终端 vs 云端:VTJ.PRO、Claude Code、Codex 三强横评
前端·vue.js·人工智能·低代码·架构
kyriewen3 小时前
Godot 全面封杀 Vibe Coding,作为每天用 AI 写代码的人,我反而觉得这是件好事
前端·ai编程·claude
前进的搬砖er4 小时前
4.three.js的几何体、纹理、光源、材质、uv属性 讲义
前端
前端毕业班4 小时前
uni-app 小程序支持 teleport 了
前端·javascript·vue.js