Firefox CSS automatic line wrapping Implementation Method _ Experience Exchange
Source: Internet
Author: User
IE directly with:
Word-break:break-all; /* Allow word wrapping in words */
Word-wrap:break-word; /* content will be wrapped within the boundary */
/* The default to note is: */
Word-wrap:normal/* Allow content to open the specified window border */
And Firefox is not a good way to achieve, a compromise is to use the scroll bar, but the internet also put forward a method of using JS to judge the line, here excerpt (transferred from the network, hereby explained). JavaScript Copy Code
Note: The above script is placed in front.
Same page single call:
Here is the content to apply the line break
Multiple invocations of the same page:
Here is the content to apply the line break
Here is the content to apply the line break
Note: The application of JS written in the back, where 60 is a row to display how many characters, notice the corresponding changes in the ID of multiple calls, not the same ID name, after applying the above method, IE will be set by the number of characters to line, but IE inside support automatic line, so as long as to determine whether it is IE, If not IE, do not output the above xml/html copy code
This JS, if not will be output. Code is not tested, I only see the idea, there is a need to debug it yourself! Leave a message for me in error.
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.