- Foundation5 教程
- Foundation 起步
- Foundation 文本
- Foundation 表格
- Foundation 按钮
- Foundation 按钮组
- Foundation 图标
- Foundation 标签
- Foundation 提醒框
- Foundation 进度条
- Foundation 面板
- Foundation 图片
- Foundation 下拉菜单
- Foundation 折叠列表
- Foundation 列表
- Foundation 选项卡
- Foundation 分页
- Foundation 价格表
- Foundation 顶部导航栏
- Foundation 侧边栏
- Foundation 滑动导航(Off-Canvas)
- Foundation 麦哲伦(Magellan)导航
- Foundation 表单
- Foundation 输入框尺寸
- Foundation 开关
- Foundation 滑块
- Foundation 提示框
- Foundation 模态框
- Foundation Joyride
- Foundation 均衡器(Equalizer)
- Foundation 网格系统
- Foundation 网格 - 水平堆叠
- Foundation 网格 - 小型设备
- Foundation 网格 - 中型设备
- Foundation 网格 - 大型设备
- Foundation 块状网格
- Foundation 网格实例
- Foundation 图标参考手册
- Foundation CSS 参考手册
- Foundation CSS 可见性
Foundation 提醒框
Foundation 可以很简单的创建一个提醒框:
提醒框可以使用 .alert-box
类创建, 可以添加可选的类: .secondary
, .success
, .info
, .warning
或
.alert
:
实例
<div data-alert class="alert-box">
This is a default alert box.
</div>
<div data-alert class="alert-box secondary">
This is a secondary alert box.
</div>
<div data-alert class="alert-box success">
<strong>Success!</strong> This alert box indicates a successful or positive action.
</div>
<div data-alert class="alert-box info">
<strong>Info!</strong> This alert box indicates a neutral informative change or action.
</div>
<div data-alert class="alert-box warning">
<strong>Warning!</strong> This alert box indicates a warning that might need attention.
</div>
<div data-alert class="alert-box alert">
<strong>Alert!</strong> This alert box indicates a dangerous or potentially negative action.
</div>
This is a default alert box.
</div>
<div data-alert class="alert-box secondary">
This is a secondary alert box.
</div>
<div data-alert class="alert-box success">
<strong>Success!</strong> This alert box indicates a successful or positive action.
</div>
<div data-alert class="alert-box info">
<strong>Info!</strong> This alert box indicates a neutral informative change or action.
</div>
<div data-alert class="alert-box warning">
<strong>Warning!</strong> This alert box indicates a warning that might need attention.
</div>
<div data-alert class="alert-box alert">
<strong>Alert!</strong> This alert box indicates a dangerous or potentially negative action.
</div>
提醒框的宽度为容器的 100%。 |
圆角提醒框
.radius
和 .round
类用于为提醒框添加圆角:
实例
<div data-alert class="alert-box success radius">
<strong>Success!</strong> Alert box with a radius.
</div>
<div data-alert class="alert-box info round">
<strong>Info!</strong> Alert box that is rounded.
</div>
<strong>Success!</strong> Alert box with a radius.
</div>
<div data-alert class="alert-box info round">
<strong>Info!</strong> Alert box that is rounded.
</div>
关闭提醒框
要关闭提醒框,可以在连接或按钮元素上添加 class="close"
类,并初始化 Foundation JS:
实例
<div data-alert class="alert-box">
This is a default alert box with closing functionality.
<a href="#" class="close">×</a>
</div>
<script>
// Initialize Foundation JS For Functionality
$(document).ready(function() {
$(document).foundation();
})
</script>
This is a default alert box with closing functionality.
<a href="#" class="close">×</a>
</div>
<script>
// Initialize Foundation JS For Functionality
$(document).ready(function() {
$(document).foundation();
})
</script>
× (×) 是一个 HTML 字符实体表示一个关闭按钮的图标,而不是字母 "x"。 |
上一篇:Foundation 标签
下一篇:Foundation 进度条
关注微信小程序
扫描二维码
程序员编程王