准備環境:安裝bootstrap
1、https://v3.bootcss.com/ 點擊下載Bootstrap,選擇“用於生產環境的Bootstrap”下載
同時下載jQuery安裝包,放到JS文件夾里面。
http://jquery.com/download/選擇版本進行下載,點擊以后是一個代碼網頁,這時候右鍵點擊另存為即可。
點擊以后是一個代碼網頁,這時候右鍵點擊另存為即可。
熟悉Bootstrap應用:建立一個新的index.html文件
1 <!DOCTYPE html> 2 <html lang="zh-CN"> 3 <head> 4 <meta charset="utf-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" content="width=device-width, initial-scale=1"> 7 <!-- 上述3個meta標簽*必須*放在最前面,任何其他內容都*必須*跟隨其后! --> 8 <title>Bootstrap 101 Template</title> 9 10 <!-- Bootstrap --> 11 <link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="external nofollow" rel="external nofollow" rel="stylesheet"> 12 13 14 </head> 15 <body> 16 <h1>你好,世界!</h1> 17 18 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 19 <script src="bootstrap-3.3.7-dist/js/jquery-3.1.1.min.js"></script> 20 <!-- Include all compiled plugins (below), or include individual files as needed --> 21 <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> 22 </body> 23 </html>
11行導入css 19行導入jquery 21行導入js