Article From:https://www.cnblogs.com/new-dream-new-hope/p/9134029.html

Today, the test puts forward a small problem:

The title of the product reads the background content, but the content of the tester is a string of numbers or English, then the number will go beyond the div or even the body, and the cell phone end shows overflow-y:visible; the effect, that is, can be dragged and left.

This is embarrassing.

If it is a Chinese character, it will wrap automatically when it exceeds the width. Then we need to define it explicitly.

 

 

word-wrapProperties allow extra long content to be automatically changed.Word-wrap: normal|break-word;Normal, the line is only allowed at the allowed hyphenation point (the browser maintains the default processing).Break-word, in long words or URLThe address is changed inside the address.

 

 

Then use word-wrap:break-word on div, and / or force wrap.

 

Leave a Reply

Your email address will not be published. Required fields are marked *