技海泛舟(个人技术研究)

  • 首页
  • 日积月累
  • 学习计划
  • 随想
  • project
  • 关于
技海泛舟
一个技术宅的博客
  1. 首页
  2. 日积月累
  3. html5
  4. 正文

2021年11月25日 584点热度

html中给表格添加斜线
图片

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>td加斜线</title>
<style>
table{
border-collapse:collapse;
}
table,tr,td{
border:1px solid black;
}
td{
width:100px;/*这里需要自己调整,根据自己的需求调整宽度*/
height:50px;/*这里需要自己调整,根据自己的需求调整高度*/
position: relative;
}
td[class=first]:before{
content: "";
position: absolute;
width: 1px;
height:114px;/*这里需要自己调整,根据td的宽度和高度*/
top:0;
left:0;
background-color: black;
display: block;
transform: rotate(-63deg);/*这里需要自己调整,根据线的位置*/
transform-origin: top;
}

</style>
</head>
<body>
<table>
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
</tr>
<tr>
<td class="first"></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>

</html>
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年11月25日
< 上一篇
下一篇 >
归档
  • 2024 年 11 月
  • 2024 年 8 月
  • 2024 年 5 月
  • 2024 年 2 月
  • 2023 年 12 月
  • 2023 年 11 月
  • 2023 年 9 月
  • 2023 年 6 月
  • 2022 年 12 月
  • 2022 年 11 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 8 月
  • 2022 年 7 月
  • 2022 年 6 月
  • 2022 年 5 月
  • 2022 年 4 月
  • 2022 年 3 月
  • 2022 年 2 月
  • 2022 年 1 月
  • 2021 年 12 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 5 月
分类
  • Android
  • Arduino
  • cordova
  • css
  • go
  • html5
  • JavaScript
  • nodejs
  • oracle
  • project
  • system
  • uni-app
  • vscode
  • vue
  • 学习计划
  • 摘抄
  • 随想
最新 热点 随机
最新 热点 随机
windows安装mysql ,VSCODE连接MySQL数据库 创建api的逻辑 观看七战奥运会 德国波尔告别 go utils工具 Go语言中的sort包帮我们实现了对任一类型的数组进行排序。 vue + go安装
转自雷军微博:评估创业项目的十大标准 原生JS获取表单内的所有值 【go】运行main时,error obtaining VCS status: exit status Android日期时间对话框 Go language single file creation user 位、字节、字的概念和关系

COPYRIGHT © 技海泛舟(个人技术研究). 2021-2023. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

黑ICP备19002110号-1

黑公网安备 23060202000432号