Foundation 中文手册 /Foundation 提醒框

Foundation 提醒框

Foundation 可以很简单的创建一个提醒框:

提醒框可以使用.alert-box类创建, 可以添加可选的类:.secondary,.success,.info,.warning.alert:

实例

   Foundation 实例       

提醒框

This is a default alert box.
This is a secondary alert box.
Success! This alert box indicates a successful or positive action.
Info! This alert box indicates a neutral informative change or action.
Warning! This alert box indicates a warning that might need attention.
Alert! This alert box indicates a dangerous or potentially negative action.

运行实例 »

点击 "运行实例" 按钮查看在线实例


Note 提醒框的宽度为容器的 100%。

圆角提醒框

.radius.round类用于为提醒框添加圆角:

实例

   Foundation 实例       

圆角提醒框

Default Alert box
Default Alert box with a radius.
Secondy Alert box with a radius.
Success! Alert box with a radius.
Info! Alert box that is rounded.
Warning! Alert box that is rounded.
Alert! Alert box that is rounded.

运行实例 »

点击 "运行实例" 按钮查看在线实例


关闭提醒框

要关闭提醒框,可以在连接或按钮元素上添加class="close"类,并初始化 Foundation JS:

实例

   Foundation 实例       

关闭提醒框

This is a default alert box. ×
This is a secondary alert box. ×
Success! This alert box indicates a successful or positive action. ×
Info! This alert box indicates a neutral informative change or action. ×
Warning! This alert box indicates a warning that might need attention. ×
Alert! This alert box indicates a dangerous or potentially negative action. ×

运行实例 »

点击 "运行实例" 按钮查看在线实例

Note × (×) 是一个 HTML 字符实体表示一个关闭按钮的图标,而不是字母 "x"。