Bootstrap_ Typesetting _ Text style

Source: Internet
Author: User

First, the paragraph

A paragraph is one of the other important elements in typography. A global text style is set for text in bootstrap (the text referred to here refers to the body text):

1, the global text font size is 14px (font-size).

2, Row height for 1.42857143 (line-height), about 20px(You see a string of decimals may have doubts, in fact, he is calculated by the less compiler, of course, Sass also has such a function).

3, the color is dark gray (#333);

Second, the text style

In a real project, for some important text, the part that you want to highlight will do a different style of processing. Bootstrap also did some lightweight processing for this part.

If you want a paragraph p to be highlighted, you can do so by adding the class name ".lead", which is to increase the text size, bold text, and handle the line height and margin accordingly.

1. Bold

In bootstrap, you can use the <b> and <strong> tags to make text bold directly.

2. Italic body

In bootstrap, you can use <em> or <i> to implement text italic.

Iii. emphasis on class

    • . text-muted: Tip, use light grey (#999)
    • . Text-primary: Main, using blue (#428bca)
    • . text-success: Success, using light green (#3c763d)
    • . TEXT-INFO: Notification information, using light blue (#31708f)
    • . text-warning: Warning, using yellow (#8a6d3b)
    • . Text-danger: Dangerous, using Brown (#a94442)
<Divclass= "text-muted">. text-muted Effects</Div><Divclass= "Text-primary">. Text-primary Effects</Div><Divclass= "Text-success">. text-success Effects</Div><Divclass= "Text-info">. Text-info Effects</Div><Divclass= "Text-warning">. text-warning Effects</Div><Divclass= "Text-danger">. Text-danger Effects</Div>

The effect is as follows:

Four, text alignment

The alignment of text is inseparable from the layout. Text-align is often used in CSS to set the alignment style of text. There are four main types of styles:

? Left-Justified

? Center alignment, Value Center

? Right-justified, take value

? Justify, value justify

For ease of use, bootstrap controls the alignment style of text by defining four class names:

? . Text-left: Left Justified

? . Text-center: Center Alignment

? . Text-right: Right-justified

? . Text-justify: Justify on both sides

Bootstrap_ Typesetting _ Text style

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.