首页 > 代码库 > 第十周 学习博客3

第十周 学习博客3

Bootstrap 中在<button> 类中定义属性,可以改变按钮的颜色:

<button type="button" class="btn btn-default">Default</button>

  技术分享

<button type="button" class="btn btn-primary">Primary</button>

  技术分享

<button type="button" class="btn btn-success">Success</button>

  

技术分享

<button type="button" class="btn btn-info">Info</button>

  技术分享

<button type="button" class="btn btn-warning">Warning</button>

  技术分享

<button type="button" class="btn btn-danger">Danger</button>

  技术分享

 

整体代码:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" name="viewport">
	<link rel="stylesheet"  href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
	<title>Document</title>
</head>
<body>
	<div class="container">
	  <!-- Standard button -->
<button type="button" class="btn btn-default">Default</button>
<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
<button type="button" class="btn btn-primary">Primary</button>

<!-- Indicates a successful or positive action -->
<button type="button" class="btn btn-success">Success</button>

<!-- Contextual button for informational alert messages -->
<button type="button" class="btn btn-info">Info</button>

<!-- Indicates caution should be taken with this action -->
<button type="button" class="btn btn-warning">Warning</button>

<!-- Indicates a dangerous or potentially negative action -->
<button type="button" class="btn btn-danger">Danger</button>

<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
<button type="button" class="btn btn-link">Link</button>
	</div>
</body>
</html>

  

 

第十周 学习博客3