javascript - 在值之前先有 td 为空的表。为什么?
问题描述
我的 td 表在值之前先为空。为什么?我的html是:
<div class="observations">
<div class="sessao_conteudo">
<table class="obs-tabela">
<caption class="obs-caption"><strong>Observations</strong></caption>
<td class="obs-tab-thead">
{{props obs}} {{if key
<=0 }} {{props prop}} <br>{{>key}}:
{{/props}} {{/if}} {{/props}}
</td>
<td>
{{for obs}}
<td class="obs-tab-td">
{{props}}
<br>
{{>prop}}
{{/props}}
</td>
{{/for}}
</td>
</table>
</div>
</div>
如果运行表:
解决方案
我的 CSS :
.observations{
float: left;
display: flex;
width: 45%;
padding: 10px 1% 0px 4px;
}
.obs-caption {
display: table-caption;
text-align: center;
background-color: #DCDCDC;
}
.obs-tabela{
font-size: 16px;
border: 1;
}
.obs-tab-thead{
text-align: left;
width: 109px;
border: 1px solid black;
}
.obs-tab-td{
text-align: left;
border: 1px solid black;
}
推荐阅读
- apache-spark - 如何使用 spark DS 从嵌套的 json 中提取数据?
- css - 如何在多边形的psedo元素周围添加盒子阴影?
- css - 应用了 CSS 类,但没有应用样式
- ruby-on-rails - Turbolinks 访问页面中缺少 hubspot 聊天界面,但可以刷新整个页面
- laravel - 自定义 cron(5 8 * * *) 函数在 laravel 任务调度中不起作用
- github - 如何使用 GitHub 身份验证从 Ubuntu 命令行克隆私有 GitLab 存储库?
- amazon-web-services - CloudWatch 警报到不同区域的 SNS
- angular - 无法将值传递给 Matdialog
- makecert - 使用没有 pvk 文件的 makecert 创建证书
- java - 对错误接口的 Binder 调用