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:
body
set 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
.container
Class is used to fix widths and support a container for responsive layouts.
<class= "container"> ... </ Div >
.container-fluid
Class 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