<table>
<tr>
<th>Date</th>
<th>Products</th>
</tr>
<tr *ngFor="let x of orderdetails">
<td>{{x.orderdate}}</td>
<td *ngFor="let y of x.orderproducts">
<span class="break">{{y}}</span><br>
</td>
</tr>
</table>
如何打破td中给出span的行, CSS 。打破{ 自动换行:打破字; 空白:预缠绕; } 皇家阿斯皮拉应该放在皇家原子下面
答案 0 :(得分:1)
试试这个
<table>
<tr>
<th>Date</th>
<th>Products</th>
</tr>
<tr *ngFor="let x of orderdetails">
<td>{{x.orderdate}}</td>
<td>
<div *ngFor="let y of x.orderproducts">
<span class="break">{{y}}</span>
</div>
<br>
</td>
</tr>
</table>