60 |

61 |
62 |
66 |
67 |
68 |
Buttons
69 |
The "buttons" can be created by adding class="button"
to any appropriate <a>
, <button>
, or <input>
element. Add a further class of pill
to create a button pill-like button. Add a further class of primary
to emphasise more important actions.
70 |
71 |
72 |
<a href="#" class="button">Post comment</a>
73 |
78 |
79 |
80 |
84 |
85 |
86 |
<a href="#" class="button primary">Publish post</a>
87 | <a href="#" class="button">Save as draft</a>
88 |
Publish post Save as draft
89 |
90 |
91 |
92 |
93 |
Buttons with dangerous actions
94 |
If you have a button that triggers a dangerous action, like deleting data, this can be indicated by adding the class danger
.
95 |
96 |
<a href="#" class="button danger">Delete post</a>
97 |
Delete post
98 |
99 |
100 |
101 |
102 |
Big buttons
103 |
If you wish to emphasize a specific action you can add the class big
.
104 |
105 |
106 |
<a href="#" class="button big">Create Project</a>
107 |
Create Project
108 |
109 |
110 |
111 |
112 |
Grouped buttons
113 |
Groups of buttons can be created by wrapping them in an element given a class of button-group
. A less important group of buttons can be marked out by adding a further class, minor-group
.
114 |
115 |
116 |
<div class="button-group">
117 | <a href="#" class="button primary">Dashboard</a>
118 | <a href="#" class="button">Inbox</a>
119 | <a href="#" class="button">Account</a>
120 | <a href="#" class="button">Logout</a>
121 | </div>
122 |
128 |
129 |
130 |
131 |
<ul class="button-group">
132 | <li><a href="#" class="button primary pill">Dashboard</a></li>
133 | <li><a href="#" class="button pill">Inbox</a></li>
134 | <li><a href="#" class="button pill">Account</a></li>
135 | <li><a href="#" class="button pill">Logout</a></li>
136 | </ul>
137 |
143 |
144 |
145 |
146 |
<div class="button-group minor-group">…</div>
147 |
153 |
154 |
155 |
156 |
157 |
Mixed groups
158 |
Displaying a mixture of grouped and standalone buttons, as might be seen in a toolbar, can be done by adding another wrapping element with the class button-container
.
159 |
160 |
161 |
<div class="actions button-container">
162 | <a href="#" class="button primary">Compose new</a>
163 |
164 | <div class="button-group">
165 | <a href="#" class="button primary">Archive</a>
166 | <a href="#" class="button">Report spam</a>
167 | <a href="#" class="button danger">Delete</a>
168 | </div>
169 |
170 | <div class="button-group minor-group">
171 | <a href="#" class="button">Move to</a>
172 | <a href="#" class="button">Labels</a>
173 | </div>
174 | </div>
175 |
189 |
190 |
191 |
192 |
193 |
Buttons with icons
194 |
A range of icons can be added (only for links and buttons) by adding a class of icon
and any one of the provided icon classes:
195 |
196 |
197 |
<a href="#" class="button icon search">Search</a>
198 |
Search
199 |
200 |
201 |
335 |
336 |
337 |
338 |
Browser compatibility
339 |
Firefox 3.5+, Google Chrome, Safari 4+, IE 8+, Opera 10+.
340 |
Note: Some CSS3 features are not supported in older versions of Opera and versions of Internet Explorer prior to IE 8. The use of icons is not supported in IE 6 or IE 7.
341 |
342 |
343 |
347 |
348 |
352 |
353 |
354 |
357 |
358 |
359 |
--------------------------------------------------------------------------------