2.Bootstrap Global CSS styles and font icons

Source: Internet
Author: User
Tags jquery library

I. Global CSS Styles

1.HTML5 document type, standard, set with reference to the following

<! DOCTYPE HTML > <  lang= "ZH-CN">   ... </ HTML >

2. Mobile device priority bootstrap is mobile device first!

To ensure proper drawing and touch-screen scaling, you need to add viewport metadata tags to

<name= "Viewport"  content= "Width=device-width, initial-scale=1"  >

* * Setting the Meta property to User-scalable=no with the viewport (viewport) disables its zoom function.

<name= "Viewport"  content= "Width=device-width, Initial-scale =1, maximum-scale=1, user-scalable=no ">

3. Typography and Links

Bootstrap layout, link style Sets the basic global style. respectively:

    • bodyset for elementbackground-color: #fff;
    • Use @font-family-base , @font-size-base and @line-height-base variables as basic parameters for typesetting
    • Basic colors are set for all links @link-color , and underline is added when the link is in the :hover state

These styles can be found in the scaffolding.less file of the corresponding source code.

4.normalize.css

5. Layout container

.containerClass is used to fix widths and support a container for responsive layouts.

<class= "container">  ... </ Div >

.container-fluidClass is used for 100% widths, which occupy the entire viewport (viewport) of the container

<class= "Container-fluid">  ... </ Div >

......

Two. Font icon

Create a nested <span> tag and apply the icon class to the <span> tag!!!

* * Icon classes can only be applied to elements that do not contain any text content or child elements. it works only on elements whose contents are empty!!

* * to set the correct inner fill (padding), be sure to add a space between the icon and the text.

<!DOCTYPE HTML> <!--HTML5 's documentation -<HTMLLang= "en"> <!--language - <Head>  <MetaCharSet= "UTF-8"> <!--encoding Format -  <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge"> <!--the analytic mode of IE browser -  <Metaname= "Viewport"content= "Width=device-width, initial-scale=1"> <!--Windows Settings -  <Metaname= "Generator"content= "EditPlus?">  <Metaname= "Author"content="">  <Metaname= "Keywords"content="">  <Metaname= "Description"content="">  <title>Document</title>  <!--1.Bootstrap Cascading Style sheets -  <Linkhref= "Css/bootstrap.min.css"rel= "stylesheet">  <!--HTML5 Shim and Respond.js for IE8 support of HTML5 elements and media queries -    <!--WARNING:Respond.js doesn ' t work if you view the page via file:// -    <!--[If Lt IE 9]> <script src= "Https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js" ></script> <script src= "Https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js" ></script> <! [EndIf] - </Head> <Body><!--font icons below this!--><spanclass= "Glyphicon glyphicon-send"></span>    <!--2.jQuery Library, must be before loading Bootstrap.min.js -    <Scriptsrc= "Https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></Script>    <!--3. Load Bootstrap's core JS library -    <Scriptsrc= "Js/bootstrap.min.js"></Script> </Body></HTML>

http://www.bootcss.com/

2.Bootstrap Global CSS styles and font icons

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.