Table of Contents
什么是Bootstrap?
Bootstrap下载
Bootstrap标准模板
hello,world
全局样式
Home Web Front-end HTML Tutorial Bootstrap入门笔记之(零)Bootstrap简介_html/css_WEB-ITnose

Bootstrap入门笔记之(零)Bootstrap简介_html/css_WEB-ITnose

Jun 24, 2016 am 11:29 AM

什么是Bootstrap?

  1. Bootstrap 是由Twitter推出的一个用于快速开发 Web 应用程序和网站的前端框架。
  2. 基于html5、css3的bootstrap,具有下面这些诱人特性:

    (1)移动设备优先;

    (2)漂亮的设计;

    (3)友好的学习曲线;

    (4)卓越的兼容性;

    (5)响应式设计;

    (6)12列响应式栅格结构;

    (7)样式向导文档。

  3. 自定义JQuery插件,完整的类库,基于Less、Sass等

Bootstrap下载

可以在其 中文官网 中下载,可以很明显的看到一个大大的下载按钮,此外还可以通过CDN,git命令,以及npm等等方式进行下载。

如果您恰好看了我写的sublime Text的博客的话,肯定知道我们是可以直接通过插件进行安装的。只需要在 ctrl + shift + P 时,输入 fecth:manage ,进行如下设置:

"packages":    {        "Bootstrap": "https://github.com/twbs/bootstrap/releases/download/v3.3.6/bootstrap-3.3.6-dist.zip"    }
Copy after login

之后就可以直接通过sublime Text进行下载了,还是刚刚的步骤,但是这一次输入的是 fetch:package 。找到 Bootstrap ,如果下载成功在您的文件夹中应该可以看到主要包括三个文件夹 css , fonts 和 js ,如下:

可以看到除去字体文件夹外的其他文件夹中每一分文件都有两个不同的版本,一个完整版的文件,方便查看源码如: bootstrap.js 和一个用于实际生产情况的压缩文件如 bottstrap.min.js ;

在字体文件中可以看到有很多文件,但是它的功能很简单,就是是用来制作 icon图标 的文件,使用了CSS3的@font-face技术。

在实际情况中,如果你还想使用更多的图标,还可以在 Iconfont-阿里巴巴矢量图标库 ,自行查找设置。

Bootstrap标准模板

<!DOCTYPE html><html lang="zh-CN">  <head>    <meta charset="utf-8">    <!-- 在IE运行最新的渲染模式 -->    <meta http-equiv="X-UA-Compatible" content="IE=edge">    <!-- 初始化移动浏览显示 -->    <meta name="viewport" content="width=device-width, initial-scale=1">    <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->    <title>Bootstrap 标准模板</title>    <!-- 1. 加载Bootstrap层叠样式表 -->    <link href="css/bootstrap.min.css" rel="stylesheet">    <!-- 你自己自定义的样式文件 -->    <link href="css/your-style.css" rel="stylesheet">    <!-- 以下两个插件用于在IE8以及以下版本浏览器支持HTML5元素和媒体查询,如果不需要用可以移除 -->    <!--[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 id="hello-world">hello,world</h1>    <!-- 2. 如果要使用Bootstrap的js插件,必须加载jquery库,且必须在bootstrap库之前 -->    <script src="js/jquery-min-1.11.3.js"></script>    <!-- 3. 包括所有bootstrap的js插件或者可以根据需要使用的js插件调用-->    <script src="js/bootstrap.min.js"></script>  </body></html>
Copy after login

全局样式

Bootstrap框架的核心是轻量的CSS基础代码库,他并没有一味的重置样式,而是注重各浏览器基础表现,降低开发难度。

为了增强跨浏览器表现的一致性,Bootstrap使用了Normalize.css。但没有一味全部使用该重置样式,而是在此基础之上进行了一些改良,让其更加符合Bootstrap的设计思想。

Bootstrap保留和坚持部分浏览器的基础样式,解决部分潜在的问题,提升一些细节的体验,在排版、链接样式设置了基本的全局样式。具体说明如下:

  • 移除body的margin声明
  • 设置body的背景色为白色
  • 为排版设置了基本的字体、字号和行高
  • 设置全局链接颜色,且当链接处于悬浮 :hover 状态时才会显示下划线样式

Bootstrap简介部分到此就结束了,在Bootstrap的 中文官网 中,有着层次清晰且详细的说明文档,下面就和我一起走进Bootstrap的世界吧!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

See all articles