在Bootstrap中创建按钮,可以创建<a>,或者是<input>,或者是button,这三个标签我们可以设置其属性class是btn,或者是关于btn的一些属性。
<!DOCTYPE html>
<html>
<head>
<Meta charset="utf-8">
<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css">
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script type="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<title></title>
</head>
<body>
<a class="btn btn-default" href="#" role="button">链接</a>
<button class="btn btn-default" href="submit">按钮</button>
<input class="btn btn-default" type="button" value="输入">
<input class="btn btn-default" type="submit" value="提交">
</body>
</html>
可以看出的 是<a>我们创建的时候是让role的属性设置为button,b当然是专门的按钮,input当我们设置type的值为button,或者是type的值为submit的时候,表现出来的是按钮,其实在这个地方我们看做是按钮的一个集合,因为在hTML中我们可以表现按钮的方式就是这些。