How to implement Web page text in the original format display:
Sometimes we need the text in the page to achieve a simple display of the original format, such as space and line wrapping, but the browser can not be implemented in the resolution of our requirements, the following is a combination of <pre> tags to achieve this function code, I hope you can do a reference.
The code is as follows:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">Div{width:150px;White-space:Normal;}Pre{White-space:Pre-wrap;/*css-3*/White-space:-moz-pre-wrap;/*mozilla,since1999*/White-space:-pre-wrap;/*opera4-6*/White-space:-o-pre-wrap;/*Opera7*/Word-wrap:Break-word;/*internetexplorer5.5+*/}</style><Body><Div> <Pre>Ant tribe Ant Tribe two ant tribe three ant tribe four</Pre></Div></Body></HTML>
The above code implements our requirements, here is mainly the use of <pre> tags, you can refer to the HTML <pre> tags section.
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=12695
For more information, refer to: http://www.softwhy.com/divcss/
How to implement Web page text original format display