p
未包含在td
中,请参阅下面的演示:
http://fiddle.jshell.net/Grp2Q/
<td align="left" style="padding:0px; width:200px;">
<img src="http://placehold.it/200x200" />
</td>
<td style="padding-left:20px;max-width:100%;">
<p>dfgdfgggggggggggggggggggggdfgdfgdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdf</p>
</td>
答案 0 :(得分:4)
答案 1 :(得分:0)
使用word-break:break-all
<td style="padding-left:20px;max-width:100%;word-break:break-all;">
<p>dfgdfgggggggggggggggggggggdfgdfgdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdf</p>
</td>
答案 2 :(得分:0)
在段落中添加这样的样式:
.word_wrap {word-wrap:break-word;}
答案 3 :(得分:0)
试试这段代码:
<强> FIDDLE 强>
<强> CSS 强>:
table {
table-layout: fixed;
width: 100%;
}
td {
word-wrap: break-word;
}
答案 4 :(得分:0)
请加上css div table tr td {word-break:break-all;}