bootStrap的基本使用

92 阅读1分钟
<!DOCTYPE html>
<html>
	<head>
        //1.想要使用bootstrap首先要有下面三个meta
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title></title>
        //2.其次要引用bootStrap的css 在官网上下载jar包
		<link href="./css/bootstrap.min.css" rel="stylesheet">
	</head>
	<body>
		<form class="form-inline">
		  <div class="form-group">
		    <label for="exampleInputName2">Name</label>
		    <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
		  </div>
		  <div class="form-group">
		    <label for="exampleInputEmail2">Email</label>
		    <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
		  </div>
		  <button type="submit" class="btn btn-default">Send invitation</button>
		</form>
        //3.bootstrap是基于jquery的 所以要再导入一个jquery jar包
        <script src="./js/jquery-3.4.1.min.js" type="text/javascript" ></script>
        //4.再导入一个bootStrap的js jar包
		<script src="./js/bootstrap.min.js" type="text/javascript" ></script>
        //以上步骤是使用bootStrap的必须步骤
	</body>
</html>