bootstrap简洁、直观、强悍的前端开发框架,让Web开发更迅速,简单(背的东西较多)

例1 HTML5-bootstrap-js plugin 缩放倍率,为1表示不缩放。

例2 HTML5-bootstrap-js plugin 表示在手机上能用手撑开放大用,值可以为yes,no,0,1。

例3

HTML5-bootstrap-js plugin
让字体在不同的设备上显示的正常一些。

例4

HTML5-bootstrap-js plugin

例5:媒体查询(两种用法)

法一
HTML5-bootstrap-js plugin
法二也可以在css文件中操作,如下所示
HTML5-bootstrap-js plugin
渲染模式
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
Ie=edge表示采用最新的渲染模式

怪异盒子模型
HTML5-bootstrap-js plugin
此时显示div的宽高是200,200,不加边框
Boot模版—–index4 在网站上可以下载这些.css和.js文件
HTML5-bootstrap-js plugin
Bootstrap的模版—index5
因为bootstrap是依赖于jq的,所以要引入jquery-1.11.3.js和bootstrap.min.js,而且要放在后面。
HTML5-bootstrap-js plugin

Container容器,文本内容会根据浏览器宽度随之移动—–index5
Container-fluid容器,文本内容宽度占满全屏 不会随之移动
HTML5-bootstrap-js plugin

按钮index6.html
HTML5-bootstrap-js plugin
按钮以默认的形式显示
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
Btn按钮的属性可以运用在a标签和input控件上
HTML5-bootstrap-js plugin
按钮也分大小
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
按钮也能占满一行
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
注:一般抒写时都会用container容器包着
关于列表—–index7.html
去掉默认的样式
HTML5-bootstrap-js plugin
List-inline是水平
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
dl-horizontal让dt,dd水平的意思
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

关于图片—-index8.html
HTML5-bootstrap-js plugin
图片会跟着父容器的大小随之改变,填充整个屏幕
HTML5-bootstrap-js plugin
可以把图片调成圆形,倒圆角,加白边等
HTML5-bootstrap-js plugin

关于表格—-index9.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
三者的差别在于第二个在table中添加class=”table”,
第三个在table中添加class=”table table-hover”,鼠标移入就变色

给表格加边框
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

隔行变色
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
table-responsive 随着父容器大小的变化而变化

关于文本颜色—-index10.html
有五种颜色属性text-success,text-info,text-danger,text-warning,text-primary
HTML5-bootstrap-js plugin
可加背景颜色

第一个大写,第二个小写,第三个首字母大写
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
text-justify让文本看起来更好看,换行时适当的调整间隔
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
对齐方式Text-left,text-right,text-center

栅格系统—-index11.html(重点)
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
栅格系统将一行分成12列
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
数字代表文字占几份 如上图李照占5份,也可以如下设置
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
下面的设置,当小于md时,李照1和李照就不再同一行了,因为李照已失效,但是div是块级元素。
HTML5-bootstrap-js plugin

文本内容往右移3份,自己占两份
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

当达到一定条件时,文本“张海涛”消失。
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
注意:如果不加row,则相当于是浮动,p标签则不是独占一行
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
如果给p标签加颜色红色,则整行都是红色
Bootstrapdemo小例子—-index12.html(不太理解)
HTML5-bootstrap-js plugin

上午bootstrap

例一—-index.html
HTML5-bootstrap-js plugin
两个字重叠
HTML5-bootstrap-js plugin
表单—-index2.html(常用)

1、普通表单

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

2、行内表单

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

3、水平表单

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
内容比如用户名,后面的框在同一行

下拉(上拉)菜单—–index3.html(常用)
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin 把总体的class改成dropup
Dropdown。Dropup有相对定位的效果,ul有绝对定位的效果。

导航—–index4.html
页签式导航
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
胶囊式导航
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

两端对齐的胶囊式导航
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

竖着的胶囊式导航
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

字体图标—–index5.html去中文网找组件。象形文字图标(记得引入fonts文件夹)
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
可以修改图标的颜色
HTML5-bootstrap-js plugin
可以设置字体,要引入字体包,即让div的字体设置为汉仪行楷简字体。可以百度搜索下载
HTML5-bootstrap-js plugin

图标可以写在button内,但必须写在一个空标签里。
HTML5-bootstrap-js plugin

按钮组—–index6.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
让按钮竖起来
HTML5-bootstrap-js plugin
两端对齐

警告框—–index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

HTML5-bootstrap-js plugin 代表X号。
面包屑导航—–index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

分页条—-index7.html
HTML5-bootstrap-js plugin
此条不居中
HTML5-bootstrap-js plugin
分页器
HTML5-bootstrap-js plugin

此条居中
HTML5-bootstrap-js plugin

标签—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
巨幕—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
页头—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
下面会有一条横线
水井—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
进度条—index7.html
HTML5-bootstrap-js plugin
动态的进度条
HTML5-bootstrap-js plugin
进度条、斑马紋、动态、颜色、进度条的宽度、显示宽度
HTML5-bootstrap-js plugin
缩略图—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

  1. 列表内容

媒体对象—index7.html
HTML5-bootstrap-js plugin
media-middle垂直居中
HTML5-bootstrap-js plugin
三种样式,左图右字,左字右图,左右图中间字。

列表组—index7.html
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
面版—index7.html(较常用)
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

在最外面div加panel-danger,则只会改变面版头部的颜色。
HTML5-bootstrap-js plugin

导航条—index8.html
HTML5-bootstrap-js plugin

HTML5-bootstrap-js plugin
导航条、默认颜色、定位在上面、容器水平居中、导航、胶囊式导航、导航条里的导航使文字垂直对齐与之前颜色相反的颜色、默认选中、成为一个选项、导航条颜色改成与之前相反的颜色
HTML5-bootstrap-js plugin

可以修改颜色
HTML5-bootstrap-js plugin

导航条里的表单,如下所示
HTML5-bootstrap-js plugin
Right则表单靠最右边
HTML5-bootstrap-js plugin

可以让文本对齐
HTML5-bootstrap-js plugin
可以让按钮对齐

注意—–
在导航条后面写文字时,要注意以下情况。
HTML5-bootstrap-js plugin
下午
HTML5-bootstrap-js plugin

JS Plugin插件—index2.html

1、下拉菜单的显示

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

2、加载loading

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

3、重置reset

HTML5-bootstrap-js plugin

点击第二个按钮,将第一个按钮的值重置

4、工具提示—–index3.html

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin 默认方向是上 这个设置的是右

5、弹出框—-index4.html

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
也可以加方向
HTML5-bootstrap-js plugin

6、标签页用法—-index5.html–(常用)

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
点击不同的导航显示不同的内容

7、模态框—-index6.html–

HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

8、折叠—-index7.html–HTML5-bootstrap-js plugin

加in默认是打开的,不自动收回 ,不加in,则打开后自动收回。
HTML5-bootstrap-js plugin
只改变第一行的颜色
HTML5-bootstrap-js plugin

手风琴效果
HTML5-bootstrap-js plugin
HTML5-bootstrap-js plugin

9、轮播—-index8.html–HTML5-bootstrap-js plugin

data-interval用来设置轮播时间
HTML5-bootstrap-js plugin

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2021-06-04
  • 2021-12-04
  • 2022-03-05
  • 2021-11-26
  • 2021-07-29
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2021-12-21
  • 2021-06-15
  • 2022-12-23
  • 2021-08-30
  • 2021-10-21
相关资源
相似解决方案