- Foundation 通用
- Foundation - 全局样式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 实用程序
- Foundation - 媒体查询
- Foundation - Grid
- Foundation - Flex Grid
- Foundation - 表单
- Foundation - 可见性类
- Foundation - 基本排版
- Foundation - 排版帮助程序
- Foundation - 基本控件
- Foundation - 导航
- Foundation - 容器
- Foundation - 媒体
- Foundation - 插件
- Foundation SASS
- Foundation - Sass 函数
- Foundation - Sass Mixins
- Foundation 库
- Foundation - Motion UI
- Foundation 实用资源
- Foundation - 快速指南
- Foundation - 实用资源
- Foundation - 讨论
Foundation - Motion UI 过渡
描述
Foundation 通过使用 Motion UI 库创建的过渡类来提供过渡效果。
示例
以下示例演示了在 Foundation 中使用转换 −
<!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-compatible" content = "ie = edge" /> <meta name = "viewport" content = "width = device-width, initial-scale = 1.0" /> <title>Motion UI Transition</title> <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css"> <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.1.1/motion-ui.css"> <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script> <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script> </head> <body> <h2>Motion UI Transition Example</h2> <p><a data-toggle = "toggle_panel">Click here to toggle the panel</a></p> <div class = "callout" id = "toggle_panel" data-toggler data-animate = "hinge-in-from-bottom spin-out"> <h2>Foundation</h2> <p>Foundation is semantic, readable, flexible, and completely customizable.</p> </div> <script> $(document).ready(function() { $(document).foundation(); }) </script> </body> </html>
输出
让我们执行以下步骤,看看上面给定的代码是如何工作的 −
保存以上给定的 html 代码foundation_transitions.html文件。
在浏览器中打开此 HTML 文件,显示如下输出。
foundation_motion_ui.htm
广告