网站首页 > 技术文章 正文
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>
圆角提醒框
.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>
关闭提醒框
要关闭提醒框,可以在连接或按钮元素上添加 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>
提醒框的宽度为容器的 100%。
× (×) 是一个 HTML 字符实体表示一个关闭按钮的图标,而不是字母 "x"。
猜你喜欢
- 2024-09-12 5.标准文档结构(文档结构是什么)
- 2024-09-12 定位网页元素—第八章(网页定位怎么写)
- 2024-09-12 HTML5常用的标签 |实用干货(html5常用标签大全)
- 2024-09-12 5、标签分类和元素转换(标签元素是什么)
- 2024-09-12 「HTML二」 html常用标签(html常用标签有哪些)
- 2024-09-12 肖sir_html之A链接标签认识(2)(链接标签href属性可以指向)
- 2024-09-12 HTML详细介绍1(“html”)
- 2024-09-12 HTML5新增了哪些结构标签?(html5新增结构化标签)
- 2024-09-12 全程软件测试(八十三):HTML语言基础知识必备—读书笔记
- 2024-09-12 页面中含有分享功能使用加注意事项
- 最近发表
- 标签列表
-
- cmd/c (90)
- c++中::是什么意思 (84)
- 标签用于 (71)
- 主键只能有一个吗 (77)
- c#console.writeline不显示 (95)
- pythoncase语句 (88)
- es6includes (74)
- sqlset (76)
- apt-getinstall-y (100)
- node_modules怎么生成 (87)
- chromepost (71)
- flexdirection (73)
- c++int转char (80)
- mysqlany_value (79)
- static函数和普通函数 (84)
- el-date-picker开始日期早于结束日期 (76)
- js判断是否是json字符串 (75)
- c语言min函数头文件 (77)
- asynccallback (87)
- localstorage.removeitem (74)
- vector线程安全吗 (70)
- java (73)
- js数组插入 (83)
- mac安装java (72)
- 无效的列索引 (74)