html - 为什么 Html 中的 + 符号永远不起作用?
问题描述
我正在尝试在一个表中同时创建行跨度和列跨度。但是,我想我需要使用我的 + 号和我的范围 html 变量。我相信范围 html 变量是强制放下或强制放置您自己的表格的右侧。
<!DOCTYPE html>
<html>
<body>
<table border= "1">
<tr>
<th>C1,R1,headings</th>
<th>C2,R1,headings</th>
<th>C3,R1,headings</th>
<th>C4,R1,headings</th>
</tr>
<tr>
<td rowspan= "2" + colspan="2">
stretching from C1,R2 into
the C2,R3
</td>
</tr>
<tr>
<td scope= "row" + scope= "col">
C3,R2,textAfterwards
</td>
<td scope= "row" + scope= "col">
C4,R2,textAfterwards
</td>
</tr>
<tr>
<td scope= "row" + scope= "col">
C3,R3,textAfterwards
</td>
<td scope= "row" + scope= "col">
C4,R3,textAfterwards
</td>
</tr>
</table>
</body>
</html>
解决方案
你可以同时拥有rowspan
这样colspan
的:
<td rowspan="2" colspan="2">
令人困惑的是,您似乎认为只有在使用 + 号时才会应用它们,但这是错误的。
推荐阅读
- python - 排序时嵌套的dict抛出关键错误
- c# - 如何在没有链接文本的情况下在 MVC C# 中使用 @Action 链接
- java - 如何让(轮盘赌)日程变慢
- mysql - 无法从 AWS Lambda 函数连接到在 AWS EC2 上运行的 MySQL 实例
- mysql - LOAD DATA LOCAL INFILE 操作一些日期列
- go - 如何使 goroutines 与匿名函数一起工作,在循环中返回值
- sql - 查询具有多个同名数组的表
- chef-infra - 刀命令的ChefDk问题
- soap - WSO2 身份服务器密码更改,出现问题“无法访问用户的目录服务”
- php - ajax 请求未加载,因为服务器端 php 文件不可用