Bootstrap簡介

1、Bootstrap:
  • 簡單、靈活的用於搭建web頁面的HTML、CSS、JavaScript的工具集。
  • 基於HTML5和CSS3。
  • web搭建框架。


2、如何使用Bootsstrap:
(1)官方網站:http://getbootstrap.com/
(2)注意:Bootstrap中的JS插件依賴於JQuery因此JQuery必須在Bootstrap之前引用。
(3)
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
     //在IE中運行最新的渲染模式
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
     //初始化移動瀏覽顯示
     //viewport:用戶網頁的可視區域
     //content中的設置:寬度爲設備寬度,初始縮放爲1,即不縮放
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
     //載入Bootstrap樣式
    <link href="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://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>
(4)一般將css文件放在head標籤中,js一般放在body的最下面。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章