网站首页 > 技术文章 正文
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 页面中含有分享功能使用加注意事项
- 1512℃桌面软件开发新体验!用 Blazor Hybrid 打造简洁高效的视频处理工具
- 552℃Dify工具使用全场景:dify-sandbox沙盒的原理(源码篇·第2期)
- 503℃MySQL service启动脚本浅析(r12笔记第59天)
- 481℃服务器异常重启,导致mysql启动失败,问题解决过程记录
- 479℃启用MySQL查询缓存(mysql8.0查询缓存)
- 459℃「赵强老师」MySQL的闪回(赵强iso是哪个大学毕业的)
- 439℃mysql服务怎么启动和关闭?(mysql服务怎么启动和关闭)
- 436℃MySQL server PID file could not be found!失败
- 最近发表
- 标签列表
-
- c++中::是什么意思 (83)
- 标签用于 (65)
- 主键只能有一个吗 (66)
- c#console.writeline不显示 (75)
- pythoncase语句 (81)
- es6includes (73)
- windowsscripthost (67)
- apt-getinstall-y (86)
- node_modules怎么生成 (76)
- chromepost (65)
- c++int转char (75)
- static函数和普通函数 (76)
- el-date-picker开始日期早于结束日期 (70)
- js判断是否是json字符串 (67)
- checkout-b (67)
- c语言min函数头文件 (68)
- localstorage.removeitem (74)
- vector线程安全吗 (70)
- & (66)
- java (73)
- js数组插入 (83)
- mac安装java (72)
- eacces (67)
- 查看mysql是否启动 (70)
- 无效的列索引 (74)