For more css methods for css force-wrapping css force-do-not-wrapping, refer to the article control on the content page of this site. We have summarized the text wrapping and css writing without-wrapping in the past. However, if a table cell knows only one attribute of nowrap, it will not wrap.
This is required recently, but it is found that nowrap will still wrap in some cases! Helpless, isn't there a way to force line breaks?
Baidu gave me a bit of relief and found a solution to the problem.
Use CSS to automatically wrap or not wrap table cell data
1. Automatic line feed:
<Style type = "text/css">. autoNewline {word-break: break-all; /* required */} </style> <table> <tr> <td class = "AutoNewline"> automatic line feed, automatic line feed automatic newline, automatic newline, automatic newline </td> </tr> </table>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
2. Do not wrap:
The Code is as follows:
| Do not wrap, do not wrap, do not wrap |