一.bootstrap框架简介
Bootstrap是最流行的前端开发框架。
什么是框架:开发过程的半成品。
bootstrap具有以下重要特性:
(1)完整的CSS样式插件
(2)丰富的预定义样式表
(3)基于jQuery的插件集
(4)灵活的栅格系统
以下将简单介绍对bootstrap可能用到的知识进行梳理。
二.新手入门
笔者使用版本是3.3.x
在bootstrap中文官网可以找到以下界面
本书采用预编译的版本进行学习
三. 文件结构

生产环境使用bootstrap.min.css和bootstrap.min.js。除了font结构之外,其他文件都可以随意命名。
四. 标准模板
首先是在aptana搭建bootstrap环境。
ctrl+N新建web项目,选择默认项目,命名项目,定义位置,完成。
把下载好的文件夹dist重命名为bootstrap,复制粘贴到项目文件夹下。
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="viewport" content="width=deviece-width,initial-scale=1"> <meta name="renderer" content="Webkit"> <meta name="author" content="djtao"> <meta name="keywords" content="djtao"> <meta name="description" content="djtao"> <title>bootstrap基础模板title> <link rel="stylesheet" href="bootstrap/css/bootstrap.css"> <link rel="stylesheet" href="styles/css.css"> head> <body> <script src="scripts/jquery.min.js">script> <script src="bootstrap/js/bootstrap.min.js">script> <script src="scripts/js.js">script> body>html> |
注意用顺序,自己的样式和脚本必须在后面。
网上引用cdn是
|
1
2
3
4
5
6
7
8
|
|