Generally speaking download Txtbook in the Notepad or the like text editor under the reading experience is not very good, PC on the special installed a TXT reader seems a bit overkill, you can use HTML simple processing can be placed in the browser refreshing reading, this operation mainly with two things: A pre element, this element encapsulates the text can preserve the txt space and newline, this is cool, then the long text book does not have to do in the format processing, the rest of the center, and other typesetting processing I used the BOOTSTRAP2 version of the container element, Directly with a class container div to wrap the pre element, read the basic OK, the rest of the custom processing can be in the CSS link element behind the container element to do a fine adjustment on the OK. The color scheme in the text comes from the watercress reading
Here's a simple template:
<HTML> <Head> <Linkhref= "Http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css"rel= "stylesheet"> <style>Body{background:#e5e4db; }. Container{width:80%; }Pre{Line-height:Normal;font-family:"Helvetica Neue", Helvetica, "Lucida Grande", "Luxi Sans", Arial, "Hiragino Sans GB", Stheiti, "Microsoft Yahei", "We Nquanyi Micro Hei "," Wenquanyi micro Hei Mono "," Wenquanyi Zen Hei "," Wenquanyi Zen Hei Mono ", ligothicmed;font-size:16px;Background-color:#f6f4ec;White-space:Pre-wrap;Word-wrap:Break-word; } </style> </Head> <Body> <Divclass= "Container"> <Pre>This place will stick the Txtbook text copy in.</Pre> </Div> </Body> </HTML>
Some people would say that this is technically a bit of a sledgehammer, but from the code. Link a mature thing is much simpler than writing.
Txtbook Simple HTML readable transformation