课程表

Foundation 基础

Foundation 网格

Foundation 参考手册

工具箱
速查手册

Foundation 按钮

当前位置:免费教程 » JS/JS库/框架 » Foundation

按钮样式

Foundation 提供了 6 种按钮样式。 .button 类创建了一个蓝色的按钮并附有内边距。不同颜色按钮类为: .secondary, .success, .info, .warning.alert:

实例

<button type="button" class="button">Default</button>
<button type="button" class="button secondary">Secondary</button>
<button type="button" class="button success">Success</button>
<button type="button" class="button info">Info</button>
<button type="button" class="button warning">Warning</button>
<button type="button" class="button alert">Alert</button>

尝试一下 »

按钮类可以使用在 <a>, <button>, 或 <input> 元素:

实例

<a href="#" class="button info" role="button">Link Button</a>
<button type="button" class="button info">Button</button>
<input type="button" class="button info" value="Input Button">
<input type="submit" class="button info" value="Submit Button">

尝试一下 »

Note 为什么将 a 标签的 href 设置为 # ?

当我们不希望链接点击跳转并得到 "404" 页面时,我们可以将 a 标签的 href 设置为 #。

按钮大小

我们可以使用 .large, .small.tiny 类来设置按钮大小:

实例

<button type="button" class="button large">Large</button>
<button type="button" class="button">Default</button>
<button type="button" class="button small">Small</button>
<button type="button" class="button tiny">Tiny</button>

尝试一下 »

圆角按钮

可以使用 .radius.round 类来设置圆角按钮:

实例

<button type="button" class="button">Default Button</button>
<button type="button" class="button radius">Radius Button</button>
<button type="button" class="button round">Round Button</button>

尝试一下 »

延展按钮

可以使用 .expand 类来设置按钮的宽带为 100%:

实例

<button type="button" class="button">Default Button</button>
<button type="button" class="button expand">Expanded Button</button>

尝试一下 »

禁用按钮

可以使用 .disabled 类来设置按钮不可点击:

实例

<button type="button" class="button">Default Button</button>
<button type="button" class="button disabled">Disabled Button</button>

尝试一下 »
转载本站内容时,请务必注明来自W3xue,违者必究。
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号