Bootstrap -- 按钮样式与使用
Bootstrap -- 按钮样式与使用
1. 可用于<a>, <button>, 或 <input> 元素的按钮样式

按钮样式使用:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-primary">原始按钮</button>
<button type="button" class="btn btn-success">成功按钮</button>
<button type="button" class="btn btn-info">信息按钮</button>
<button type="button" class="btn btn-warning">警告按钮</button>
<button type="button" class="btn btn-danger">危险按钮</button>
</body>
</html>
实现效果:

2. 各种大小按钮的样式

按钮大小样式的使用:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-success">默认大小的按钮</button>
<button type="button" class="btn btn-success btn-lg">大的按钮</button>
<button type="button" class="btn btn-success btn-sm">小的按钮</button>
<button type="button" class="btn btn-success btn-xs">特别小的按钮</button>
</body>
</html>
实现效果:

3. 按钮状态:激活状态(.active)、禁用状态(disabled)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-success">默认按钮</button>
<button type="button" class="btn btn-success active">激活状态按钮</button>
<button type="button" class="btn btn-success disabled">禁用状态按钮</button>
</body>
</html>
实现效果:

4. 按钮组:使用 .btn-group 可以创建按钮组
使用按钮组:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
</head>
<body>
<div class="btn-group">
<button type="button" class="btn btn-primary">小胡子</button>
<button type="button" class="btn btn-primary">大胡子</button>
<button type="button" class="btn btn-primary">小朋友</button>
</div>
</body>
</html>
实现效果:

5. 按钮自适应样式
自适应样式使用:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
</head>
<body>
<div class="btn-group btn-group-justified">
<a href="https://www.baidu.com" class="btn btn-primary">百度</a>
<a href="https://www.taobao.com" class="btn btn-primary">淘宝</a>
<a href="https://www.qq.com" class="btn btn-primary">腾讯</a>
</div>
</body>
</html>
实现效果:

Bootstrap -- 按钮样式与使用的更多相关文章
- bootstrap按钮样式
<a class='btn' href='javascript:;'>常规按钮</a> <a class='btn btn-small' href='javascript ...
- bootstrap改变上传文件按钮样式,并显示已上传文件名
参考博文: html中,文件上传时使用的<input type="file">的样式自定义 html中<input type="file"&g ...
- 吴裕雄 Bootstrap 前端框架开发——Bootstrap 按钮:原始按钮样式(未被操作)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- Bootstrap 按钮
本章将通过实例讲解如何使用 Bootstrap 按钮.任何带有 class .btn 的元素都会继承圆角灰色按钮的默认外观.但是 Bootstrap 提供了一些选项来定义按钮的样式,具体如下表所示: ...
- BootStrap基本样式
文本对齐风格:.text-left:左对齐.text-center:居中对齐.text-right:右对齐.text-justify:两端对齐 取消列表符号:.list-unstyled内联列表:.l ...
- bootstrap 按钮 文本 浮动 隐藏
bootstrap 按钮 文本 浮动 隐藏 <!DOCTYPE html> <html lang="en"> <head> <meta c ...
- Bootstrap按钮插件
前面的话 按钮插件提供了一组可以控制按钮多种状态的功能,比如按钮的禁用状态.正在加载状态.正常状态等.本文将详细介绍Bootstrap按钮插件 加载状态 通过按钮可以设计状态提示,当单击按钮时,会显示 ...
- [置顶]
bootstrap自定义样式-bootstrap侧边导航栏的实现
前言 bootstrap自带的响应式导航栏是向下滑动的,有时满足不了个性化的需求,需要做一个类似于android drawerLayout 侧滑的菜单,这就是我要实现的bootstrap自定义侧滑菜单 ...
- 简单叨叨bootstrap按钮无限层级下拉菜单的实现
0.写在前面的话 最近看书都懈怠了,又正值新项目,虽说并不是忙得不可开交,好吧我老实交待,我就是偷懒了其实,博客也没更.言归正传,对于前端的不熟悉现在确实是个让我头疼的事情,以至于一些功能要在网络上漫 ...
随机推荐
- nginx的configure流程
configure配置 nginx的编译过程,第一步是configure.我们使用 --help可以看到configure的很多配置. configure的过程做的事情其实就是检测环境,然后根据环境生 ...
- 厉害—Ansible管理windows集群
最近公司新项目需要安装400+windows server 2012系统的工作站,想着怎么能像linux下运用ansible批量管理,linux就很简单了有ssh服务 但是下却没这么简单,但还是有办法 ...
- 再见了Server对象,拥抱IHostingEnvironment服务对象(.net core)
一.绝对路径 1.获取应用程序运行当前目录Directory.GetCurrentDirectory(). System.IO命名空间中存在Directory类,提供了获取应用程序运行当前目录的静态方 ...
- vue踩坑--TypeError: __WEBPACK_IMPORTED_MODULE_1_vuex__.a.store is not a constructor
今天在使用vuex的时候遇到这么个问题,虽然后来解决了,是首字母大写的原因,但我还是不知道为什么.这里先记录下来. 这是vuex/store.js import Vue from 'vue' impo ...
- 不在models.py中的models
概述 如何让你定义的model不在models.py中 在app的models目录中的models 你新建一个app后这个models.py就会自动建立,里面只有几行代码.那么如果是一个中大型项目,每 ...
- PC逆向之代码还原技术,第四讲汇编中减法的代码还原
目录 PC逆向之代码还原技术,第四讲汇编中减法的代码还原 一丶汇编简介 二丶高级代码对应汇编观看. 1.代码还原解析: 三丶根据高级代码IDA反汇编的完整代码 四丶知识总结 PC逆向之代码还原技术,第 ...
- [SRM603] WinterAndSnowmen
Description Sol 设 \(A=\text{XOR}(X)\),\(B=\text{XOR}(Y)\). 因为 \(A<B\),所以写下他们的二进制表示,一定是最高的几位先是相等,紧 ...
- 练习使用 __attribute__ 属性(仿照内核)
上一篇文章分析了内核中各种 initcall 的调用过程,在这个基础上大概掌握了内核中使用的这种方法,于是参考内核及网友的文章自己动手写了下,记录在这个随笔中. 源代码如下: #include < ...
- javascript基础修炼(9)——MVVM中双向数据绑定的基本原理
开发者的javascript造诣取决于对[动态]和[异步]这两个词的理解水平. 一. 概述 1.1 MVVM模型 MVVM模型是前端单页面应用中非常重要的模型之一,也是Single Page Appl ...
- IOS自带输入法中文不触发KEYUP事件导致vue双向绑定错误问题
先上图: 可以看到输入框中的内容和弹出框的内容不一致, <input class="am-fr labRight" id="txcode" type=&q ...