Bootstrap基本模板的使用和理解1

<!-- 声明文档类型 为 html5 --> <!DOCTYPE html> <!-- 声明页面内容主要为 中文简体 --> <html lang="zh-CN"> <head> <!-- 声明页面编码 为 utf-8 --> <meta charset="utf-8"> <!-- X-UA-Compatible 浏览器兼容模式 这是个是IE8的专用标记,用来指定IE8浏览器去模拟某个特定版本的IE浏览器的渲染方式(比如人见人烦的IE6),以此来解决部分兼容问题 --> <!-- 详情见 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 申明viewport 视口属性设置,只有在移动端才识别 其中属性有width = device-width 视口宽度等于 设备宽度 initial-scale = 1.0 初始化 缩放比为1:1 也就是等比显示 还有其他的属性: user-scalable = 0 ;可选值1,0, 或 yes, no 用户是否允许缩放。 maximum = 1.0 最大缩放比 minimum = 1.0 最小缩放比 --> <meta content="width=device-width, initial-scale=1"> <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --> <title>Bootstrap 模板</title> <!-- Bootstrap --> <link href="https://www.jb51.net/lib/bootstrap/css/bootstrap.css"> <!-- respond 异步加载的 本地打开 不生效 需要使用服务器,例如在 Apache 上打开--> <!-- 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:// --> <!-- 只有IE才识别的注释 --> <!-- 不支持h5标签的浏览器需要引用 html5shiv.js 包 --> <!-- 不支持媒体查询的浏览器 需引入 respond.js 包 --> <!--[if lt IE 9]> <script src="https://www.jb51.net/lib/html5shiv/html5shiv.min.js"></script> <script src="https://www.jb51.net/lib/respond/respond.js"></script> <![endif]--> </head> <body> <!-- 删掉下面的标题 就可以填写内容了 --> <h1>你好,世界!</h1> <!-- 填写内容区 --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins)   bootstrap基于jQuery 所以jQuery要先引入 --> <script src="https://www.jb51.net/lib/jquery/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="https://www.jb51.net/lib/bootstrap/js/bootstrap.js"></script> </body> </html>

所有包从本地服务器上引用,不使用CDN

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwfdpx.html