Txtbook Simple HTML readable transformation

Source: Internet
Author: User

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.