1.å¦ä½ä½¿ç¨Bootstrap
2.bootstrapå°åºç¨åä»ä¹
å¦ä½ä½¿ç¨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>
bootstrapå°åºç¨åä»ä¹
1ãBootstrapå¾éè¦çä¸æ¹é¢å°±æ¯ä½ å¯ä»¥å°å®æ®ä¸ºå·±æãä½ å¯ä»¥çåæ¡æ¶ä¸éè¦çé¨åï¼æå¼ä¸éè¦çãBootstrapæ´ä½å è®¸ä½ æ ¹æ®èªå·±çéè¦ï¼è£åªèªå·±å¼åç项ç®ã2ãBootstrapå¨ä»¥ä¸æ¹é¢ä¼å¿æ¯è¾æ¾èæ æ ¼ç³»ç»å¯ä»¥æ ¹æ®ç¨æ·å±å¹å°ºå¯¸è°æ´é¡µé¢ï¼ä½¿å ¶å¨å个尺寸ä¸é½è¡¨ç°è¯å¥½ãå®ç°è¿ä¸ªåè½ä¾èµä¸¤ä¸ªä¸è¥¿ï¼ä¸ä¸ªæ¯viewï¼å¦ä¸ä¸ªæ¯max-widthï¼min-widthã
3ãBootstrapæ¡æ¶å¯ä»¥å为ä¸ç±»ï¼ç¬¬ä¸ï¼é¢å¤çèæ¬ï¼Bootstrapçæºç æ¯åºäºææµè¡çCSSé¢å¤çèæ¬-LessåSasså¼åçãä½ å¯ä»¥éç¨é¢ç¼è¯çCSSæ件快éå¼åï¼ä¹å¯ä»¥ä»æºç å®å¶èªå·±éè¦çæ ·å¼ãä¾å¦ãå¦æä½ é¡µé¢ä¸æå¾å¤åæ ·çææã
4ãbootstrap.jsï¼æ¯bootstrapçææjsæ令çæ»åãbootstrapéé¢ææçjsææï¼é½æ¯ç±bootstrap.jsæ§å¶çãbootstrap.jsä¾å¼åçæ¶åè¿è¡è°è¯ç¨ãbootstrap.cssï¼æ¯æªå缩çï¼å®æ´çbootstrapæ ·å¼è¡¨ï¼ä¾å¼åçæ¶åè¿è¡è°è¯ä½¿ç¨ã
2024-11-27 05:18
2024-11-27 05:16
2024-11-27 04:17
2024-11-27 03:44
2024-11-27 03:28
2024-11-27 03:15