目录
Bootstrap
①.诞生于2011年,来自Twitter公司,是目前最受欢迎的前端框架
②.是一个用于快速开发Web应用程序和网站的前端框架
③.Bootstrap是基于HTML、CSS、JS的,简洁灵活,使得Web开发更加快捷
概述:Bootstrap是一个建立一个页面,就可以在三个终端(PC端、平板、手机)上完美展示的响应式前端框架
适用于
企业网站、博客、网站后台之类的网站
优势
①.响应式设计(Bootstrap的响应式CSS能够自适应台式机、平板电脑和手机)
②.移动设备优先
③.浏览器支持
④.容易上手
安装环境
①.下载Bootstrap库
https://v4.bootcss.com/
②.页面中引入库
bootstrap.css:Bootstrap核心样式【添加到head标签中】
jquery-3.3.1.js:jQuery库【注意:必须在Bootstrap核心库引入之前引入jQuery库】
bootstrap.js:Bootstrap核心库
【添加到</body>之前】
接下来让大家看看为啥他怎么受欢迎
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
.aa{
background-color: red;
color: wheat;
border: 0px;
width: 60px;
height: 40px;
font-size: 18px;
border-radius: 14px;
}
</style>
<script type="text/css">
</script>
</head>
<body>
<button class="aa">查询</button>
<hr color="red"/>
</body>
</html>
上面这个是没有使用Bootstrap下面这个是使用了的
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.css"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
</head>
<body>
<button class="btn btn-danger">查询</button>
<script src="js/jquery-3.3.1.js" type="text/text/javascript" charset="UTF-8"></script>
</body>
</html>
可以非常明显的看出来代码少了不是一点点