我有结果后面的文字(:)没有对齐.任何人都可以帮助我对他们进行调整.
<div>
<h4> Candidate Name :</h4>
<h4> Branch :</h4>
<h4> Position:</h4>
<h4> Reference Name :</h4>
<h4> Reference Phone # :</h4>
<h4> Reference Company :</h4>
<h4> Reference Job Title:</h4>
<h4> Relationship to Employee:</h4>
</div>
Run Code Online (Sandbox Code Playgroud)
电流输出:
请求的输出:

这看起来像表格数据,因此在这种情况下,您可以使用CSS表格布局
div {
display: table;
}
h4 {
display: table-row;
}
h4 span {
display: table-cell;
}Run Code Online (Sandbox Code Playgroud)
<div>
<h4> Candidate Name <span>: Random data</span></h4>
<h4> Branch <span>: Lorem</span></h4>
<h4> Position <span>: Lorem ipsum dolor</span></h4>
<h4> Reference Name <span>: Random data</span></h4>
<h4> Reference Phone # <span>: Random data</span></h4>
<h4> Reference Company <span>: Random data</span></h4>
<h4> Reference Job Title <span>: Random data</span></h4>
<h4> Relationship to Employee <span>: Random data</span></h4>
</div>Run Code Online (Sandbox Code Playgroud)
或者您可以更改HTML并只使用表格
<table>
<tr> <td>Candidate Name </td> <td>: Random data</td></tr>
<tr> <td>Branch</td> <td>: Lorem</td></tr>
<tr> <td>Position </td><td>: LOrem ipsum dolor</td></tr>
<tr> <td>Reference Name </td> <td>: Random data</td></tr>
<tr> <td>Reference Phone #</td> <td>: Random data</td></tr>
<tr> <td>Reference Company</td> <td>: Random data</td></tr>
<tr> <td>Reference Job Title</td> <td>: Random data</td></tr>
<tr> <td>Relationship to Employee </td><td>: Random data</td></tr>
</table>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
32 次 |
| 最近记录: |