- 通用 Foundation
- Foundation - 全局样式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 实用程序
- Foundation - 媒体查询
- Foundation - 网格
- Foundation - Flex 网格
- Foundation - 表单
- Foundation - 可见性类
- Foundation - 基本排版
- Foundation - 排版辅助工具
- Foundation - 基本控件
- Foundation - 导航
- Foundation - 容器
- Foundation - 媒体
- Foundation - 插件
- Foundation SASS
- Foundation - Sass 函数
- Foundation - Sass 混合
- Foundation 库
- Foundation - Motion UI
- Foundation 有用资源
- Foundation - 快速指南
- Foundation - 有用资源
- Foundation - 讨论
Foundation - 交换在 HTML 中使用
描述
Interchange 也可以用于 html 文件。它可以交换完整的 HTML 块,它被加载到所有类型的屏幕尺寸中。
示例
以下示例演示了在 Foundation 中将 interchange 与 HTML 一起使用的方式 -
<!DOCTYPE html>
<html>
<head>
<title>Foundation Template</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.css">
<script src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/foundation.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script>
</head>
<body>
<h2>Example of use with HTML</h2>
<div data-interchange = "[https://tutorialspoint.com, (small)],
[https://tutorialspoint.com, (medium)],
[https://tutorialspoint.com, (large)]"></div>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
输出
让我们执行以下步骤,了解上述给定代码是如何工作的 -
保存上述给定的 html 代码文件 use_html.html。
在浏览器中打开此 HTML 文件,将显示输出,如下所示。
foundation_plugins.htm
广告