Chapter 2: Bootstrap page layout style_javascript skills
May 16, 2016 pm 03:03 PMBootstrap, from Twitter, is currently the most popular front-end framework. Bootstrap is based on HTML, CSS, and JAVASCRIPT. It is simple and flexible, making web development faster.
Learning points:
1. Page layout
In this lesson, we mainly learn about the layout style in Bootstrap global CSS style, including regular content such as title, page body, alignment, and list.
1. Page layout
Bootstrap provides some commonly designed page layout styles for developers to use.
1. Page body
Bootstrap sets the global font-size to 14px and line-height to 1.428 (i.e. 20px); <p> the paragraph element is set equal to 1/2 line height (i.e. 10px); the color is set to # 333.
1 2 3 4 5 6 |
|
2. Title
1 2 3 4 5 6 7 |
|
We learned from viewing elements in Firebug that Bootstrap has reconstructed CSS styles for h1 ~ h6 respectively, and also supports ordinary inline element definition class=(.h1 ~ h6) to achieve the same function.
1 2 |
|
Note: Viewing elements through Firebug also shows that the font color, font style, and line height are all fixed, thus ensuring uniformity, while the native ones will be determined based on the system's built-in preferred font. The color is blackest.
Between h1 ~ h6 elements, you can also embed a small element as a subtitle,
1 2 3 4 5 6 7 |
|
Viewed through Firebug, we found that the size of the small element under h1 ~ h3 only accounts for 65% of the parent element. Then through calculation (see the style calculated by Firebug), the small under h1 ~ h3 is 23.4px, 19.5px, 15.6px; the size of small elements under h4 ~ h6 only accounts for 75% of the parent element, respectively: 13.5px, 10.5px, 9px. The small style under h1 ~ h6 has also been changed, the color becomes light gray: #777, the line height is 1, and the thickness is 400.
3. Inline text elements
1 2 3 4 5 6 7 8 9 10 11 |
|
4. Alignment
1 2 3 4 5 |
|
5. Capitalization
1 2 3 4 |
|
6. Abbreviations
1 2 |
|
7. Address text
1 2 3 4 5 6 7 |
|
8. Quote text
1 2 3 4 5 6 7 8 |
|
9. List layout
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
10. Code
1 2 3 4 5 6 |
|
Bootstrap also enumerates <var> to represent tag variables, and <samp> to represent program output, but it does not rewrite CSS.
The above is the knowledge about Bootstrap page layout style introduced by the editor. I hope it will be helpful to everyone!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Replace String Characters in JavaScript

Custom Google Search API Setup Tutorial

8 Stunning jQuery Page Layout Plugins

Improve Your jQuery Knowledge with the Source Viewer

10 Mobile Cheat Sheets for Mobile Development
