gpt4 book ai didi

html - 在动态返回的表格单元格中打断单词

转载 作者:行者123 更新时间:2023-11-28 04:08:21 28 4
gpt4 key购买 nike

所以这里的问题有点让我发疯。因此,当以下数据从服务响应返回时,它会显示在表格单元格中。我需要在单元格中对其进行格式化,而不是将其作为一长串单词。我尝试了 word-break: break-all 和其他一些东西,但没有骰子

示例 CSS

.dataTable {

.maxwidth-300 {
max-width:300px;
word-wrap: break-word;
}

.maxwidth-100 {
max-width:100px;
word-wrap: break-word;
}}

<p>Displays like this </p>
<td maxwidth-300>Response : order|confirmed' email updated with status 'Sent'. (Email ID: 835) Subject: Order Confirmed: Order 11-001270 for Anna's Flower Shoppe From: Company Reply-to: blah@blahblah.com To: emailaddress@emailaddress.com Cc: emailaddress@emailaddress.com </td>

有没有办法用 CSS 让它像这样显示?

<td maxwidth-300>
'order|confirmed' email updated with status 'Complete'. (Email ID: 833)

Subject: Order Confirmation: Order 11-001270 for Anna's Flower Shoppe
From: Company
Reply-to: blah@blahblah.com
To: emailaddress@emailaddress.com
Cc: emailaddress@emailaddress.com </td>

提前致谢

最佳答案

没关系,我用JS转义了JSON的'\n'字符

关于html - 在动态返回的表格单元格中打断单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42844328/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com