由于自己做项目的需要,只能学习起前端来了,bootstrap听说很久了,一直没学,现在开始学习一下吧。
学习网站:http://v3.bootcss.com
在该网站需要下载第一个,并解压。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<title>Bootstrap 101 Template</title>
<!-- 1.加载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="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>你好,世界!</h1>
<span class="glyphicon glyphicon-euro"></span>
<p>
<button type="button" class="btn btn-default">按钮</button>
<button type="button" class="btn btn-primary btn-lg">primary</button>
<button type="button" class="btn btn-info">信息info</button>
<button type="button" class="btn btn-success">success</button>
<button type="button" class="btn btn-warning">warning提示</button>
<button type="button" class="btn btn-success">success</button>
<button type="button" class="btn btn-success">success</button>
<button type="button" class="btn btn-success">success</button>
<!-- 2.jQuery库,同时加载该库必须在bootstrap.min.js之前 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 3.加载bootstrap核心库 -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>