We all know that the continuous English or digital can be the container is propped up, can not be based on the size of the container to automatically wrap, the following is how the CSS will be their line-wrapping Method!
For Div
1. (ie browser) white-space:normal; Word-break:break-all, where the former is to follow the standard.
#wrap {white-space:normal; width:200px;}
Or
#wrap {word-break:break-all;width:200px;}
2. (Firefox browser) white-space:normal; Word-break:break-all;overflow:hidden, the same FF also does not have a good implementation method, can only hide or add scroll bar, of course, without the scroll bar effect better!
#wrap {white-space:normal; width:200px; overflow:auto;}
Or
#wrap {word-break:break-all;width:200px; overflow:auto;}
Effect: normal display, but can not wrap (note: Under FF has not been able to make the container content of a good way, can only use overflow will be more out of the content to hide, so as not to affect the overall effect)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.