1.为ä»ä¹ä½¿ç¨bootstrap
2.å¦ä½ä½¿ç¨Bootstrap
为ä»ä¹ä½¿ç¨bootstrap
éçH5ï¼CSS3çå¿«éç«èµ·æ¥ï¼ç¨æ·ä½éªå°¤ä¸ºéè¦ï¼ç§»å¨è®¾å¤ç¨æ·çåºå¤§ï¼ä¸å®¹å°è§ï¼èæ°æ°ï¼Bootstrapå°±æ¯ä¸ºç§»å¨è®¾å¤èå¼åçæ¡æ¶ãä»è½ç¶æ¯ä»¥ç§»å¨è®¾å¤ä¼å ï¼å¾åäºMobileï¼ä½ä¸æ¯ç§»å¨è®¾å¤æ¡æ¶ãå®ç±è§èçCSSï¼JavaScriptæ件ææï¼å ¶æ大çä¼å¿æ¯ååºå¼å¸å±ï¼CSSåªä½æ¥è¯¢(Media Query)çåå³ï¼ä½¿å¾å¼åè å¯ä»¥æ¹ä¾¿ç让ç½é¡µæ 论å¨å°å¼æºï¼ææºä¸é½è·å¾æä½³çä½éªã
æ½è±¡åºå¸¸ç¨çcssæ ·å¼,源码绝地钓鱼源码é«åå¯ç¨æ§,é«ç§»æ¤æ§
æåºæçå®ä¹,详ç»çææ¡£åå¼åç¹ç¹
é«å ¼å®¹æ§,å¯ä»¥å ¼å®¹æµè¡çæµè§å¨
以css为主,ä½ä¸ä¸å®å ¨é¨æ¯css,å¯è½æä¸äºjs(æè å ¶ä»)èæ¬ç¨äºå ¼å®¹æµè§å¨
Bootstrapæ¡æ¶å¯ä»¥å为ä¸ç±»ï¼
第ä¸ï¼é¢å¤çèæ¬ï¼
Bootstrapçæºç æ¯åºäºææµè¡çCSSé¢å¤çèæ¬-LessåSasså¼åçãä½ å¯ä»¥éç¨é¢ç¼è¯çCSSæ件快éå¼åï¼ä¹å¯ä»¥ä»æºç å®å¶èªå·±éè¦çæ ·å¼ãä¾å¦ãå¦æä½ é¡µé¢ä¸æå¾å¤åæ ·çææãåªéè¦åä¸ä¸ªææç±»ãç¶å让ç¨å°çå°æ¹å»ç»§æ¿ä»ãå°±ä¸éè¦ååäºã
第äºï¼ä¸ä¸ªæ¡æ¶ï¼å¤ç§è®¾å¤
ä½ çç½ç«ååºç¨è½å¨Bootstrapç帮å©ä¸éè¿åä¸ä¸ªä»£ç å¿«éï¼ææ设é ææºï¼å¹³æ¿ãPC设å¤ï¼è¿é½æ¯CSSåªä½æ¥è¯¢çåå³ã
第ä¸ï¼ç¹æé½å ¨
Bootstrapæä¾äºå ¨é¢ãç¾è§çææ¡£ãå¯ä»¥æ¾å°å ³äºHTMLå ç´ ï¼HTMLåCSSç»ä»¶ãjQueryæ件æ¹é¢çææ详ç»ææ¡£ã
Bootstrapç»ä»¶ï¼ Bootstrapä¸å å«äºä¸°å¯çWebç»ä»¶ï¼æ ¹æ®è¿äºç»ä»¶ï¼å¯ä»¥å¿«éçæ建ä¸ä¸ªæ¼äº®ãåè½å®å¤çç½ç«ãæ¯å¦ï¼ä¸æèåãæé®ç»ãæé®ä¸æèåã导èªã导èªæ¡ãè·¯å¾å¯¼èªãå页ãæçã缩ç¥å¾ãè¦å对è¯æ¡ãè¿åº¦æ¡ãåªä½å¯¹è±¡çã
bootstrapä¼ç¹ï¼
ä¼ç¹
1.bootstapæè¿åå¸äºbootstrap4ï¼æ¥æäºbox-flexå¸å±çæ´æ°ï¼ç´§è·ææ°çwebææ¯çåå±
2.æ¯è¾æçï¼å¨å¤§éç项ç®ä¸å åç使ç¨åæµè¯
3.æ¥æå®åçææ¡£ï¼ä½¿ç¨èµ·æ¥æ´æ¹ä¾¿
4.æ大éçç»ä»¶æ ·å¼ï¼æ¥åå®å¶
å¦ä½ä½¿ç¨Bootstrap
æ¹æ³/æ¥éª¤
å°bootstrapå®æ¹ç½ç«ä¸è½½ï¼å¯¹äºæ们å¼åè æ¥è¯´ï¼ç´æ¥ä¸è½½ç¼è¯åå缩åçCSSãJavaScriptæ件ï¼å¦å¤è¿å å«åä½æ件ï¼ä½æ¯ä¸å å«ææ¡£åæºç æ件ãæå¼è§£åå ä¹åå¯ä»¥åç°å å«ä¸ä¸ªæ件夹 cssãfontsãjsãè¿æ¯æåºæ¬çBootstrapç»ç»å½¢å¼ï¼æªå缩ççæ件å¯ä»¥å¨ä»»æweb项ç®ä¸ç´æ¥ä½¿ç¨ãæ们æä¾äºå缩(bootstrap.min.*)ä¸æªå缩 (bootstrap.*)çCSSåJSæ件ãåä½å¾æ æ件æ¥èªäºGlyphicons
ææBootstrapæ件é½ä¾èµjQueryãèä¸å¨æ£å¼ç项ç®å½ä¸æ们æ¨è使ç¨å缩ä¹åççæ¬ï¼å 为å®çä½ç§¯å¾å°ï¼å°å®ç½ä¸è½½jQueryæ¯æï¼å¦å¾ï¼
å°ä¸è½½åçå°±jQueryæ¾å°bootstrapä¸çjsç®å½ä¸ï¼å¦å¾ï¼
å¨bootstrapçæ ¹ç®å½ä¸æ°å»ºä¸ä¸ªdemo.htmlæ件ï¼ï¼æ³¨æï¼å¿ é¡»å¨æ ¹ç®å½ä¸é¢æ°å»ºï¼å 为åé¢çæ¥éª¤ä¸è¦å°bootstrapæ¡æ¶ä¸çcssåjsæ件é¾æ¥å°å建çdemoä¸ï¼
ç¼è¾demo.htmlæ件ï¼æ·»å 对bootstrapæ¡æ¶ä¸cssåjsçå¼ç¨ï¼å 容å¦ä¸ï¼å¾çæ注é说æï¼è¿æ ·ï¼æ们就åºæ¬ä¸å»ºç«äºå¯¹bootstrapæ¡æ¶çåºæ¬ä½¿ç¨æ¶æ
æºç ï¼
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- viewportç<meta>æ ç¾ï¼è¿ä¸ªæ ç¾å¯ä»¥ä¿®æ¹å¨å¤§é¨åç移å¨è®¾å¤ä¸é¢çæ¾ç¤ºï¼ä¸ºäºç¡®ä¿éå½çç»å¶å触å±ç¼©æ¾ã-->
<title>æ æ é¢ææ¡£</title>
<!--æ ·å¼æ件å¼ç¨-->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js 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="/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]
IE9以ä¸çæµè§å¨å¹¶ä¸æ¯æè¿äºæ ç¾ï¼ä¹ä¸è½ä¸ºè¿äºæ ç¾è¿è¡æ·»å æ ·å¼ãé£ä¹ä¿®å¤è¿ä¸ªé®é¢æ们éè¦é¾æ¥å¼ç¨çæ件
ææå°±æ¯è¯´å¦æç¨æ·IEæµè§å¨ççæ¬å°äºIE9ï¼é£ä¹å°±ä¼å è½½è¿ä¸¤ä¸ªjsæ件åºï¼ç°å¨å°±å¯ä»¥ä½¿ç¨è¿äºæ°çæ ç¾ï¼å¹¶ä¸å¯ä»¥å¨è¿äºæ ç¾ä¸æ·»å æ ·å¼äº
-->
</head>
<body>
<!--JavaScriptæ件é½æ¯ä¾èµä¸jQueryåº-->
<script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>
å¦å¤ï¼bootstrapå®æ¹æä¾äºé¾æ¥æå¡ï¼æ°¸ä¹ å è´¹ï¼å³ä½¿ä½ ä¸ä¸è½½bootstrapæ¡æ¶æ件å°æ¬å°ï¼ä¹å¯ä»¥ç´æ¥å¨htmlä¸ä½¿ç¨ï¼ä½¿ç¨ä¸é¢è¿æ®µä»£ç ï¼
<link href="/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="/jquery/2.0.0/jquery.min.js"></script>
<script src="/bootstrap/3.0.3/js/bootstrap.min.js"></script>