How to automatically wrap long articles when making an article system
Many people have mentioned this problem. According to the online solution, the English words are broken up and line-breaking according to the solution.
The statements of most articles online are just added to CSS:
table{
table-layout:fixed;
word-break:break-all;
word-wrap:break-word;
}
div{
word-break:break-all;
word-wrap:break-word;
}
This can solve the problem that the table and layer are broken, and I did the same in the beginning. However, such code will cause a problem, and you will find that all English words have been truncated, which is not in line with English writing habits and is not conducive to reading.
Later I found that by rewriting the above code, you can prevent the table/layering from breaking and the words from breaking.
as follows:
table{
table-layout:fixed;
word-wrap:break-word;
}
div{
word-wrap:break-word;
}