在 <td> 中换行标签 [英] Wrap text in <td> tag
问题描述
我想包装一些添加到 I want to wrap some text that is added to a To Wrap TD text To Wrap TD text 首先设置表格样式 然后设置TD样式 这篇关于在 <td> 中换行标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! 元素的文本.我试过 style="word-wrap: break-word;"宽度="15%"
.但它没有包装文本.是否必须给它 100% 的宽度?我还有其他控件要显示,因此只有 15% 的宽度可用.
<td>
element.
I have tried with style="word-wrap: break-word;" width="15%"
.
But it is not wrapping the text. Is it mandatory to give it 100% width?
I have other controls to display so only 15% width is available.推荐答案
table{
table-layout: fixed;
}
td{
word-wrap:break-word
}
登录
关闭