所属分类:对话框,弹出层
jQuery对话框、模态窗插件Remodal
43173 浏览
355 收藏
16 留言
插件描述
Remodal 是一个扁平化,响应式,轻量,快速,容易定制的模态窗口插件。使用声明式状态符号和哈希(Hash)跟踪。所有现代的浏览器都支持。您可以轻松地定义为模态窗口定义背景容器(如模糊效果)。
详细内容
Remodal
响应,轻巧,快速,与CSS动画同步,完全可定制的模态窗口插件
使用方法
在头部分包含dist文件夹中的CSS文件:
<link rel="stylesheet" href="dist/remodal.css"> <link rel="stylesheet" href="dist/remodal-default-theme.css">
在</ body>之前的dist文件夹中包含JS文件:
<script src ="dist/remodal.min.js"> </script>
您可以为模态定义背景容器(如模糊效果)。它可以是任何简单的内容包装器:
<div class =“remodal-bg”> ...页面内容... </ DIV>
现在创建模态对话框:
<div class="remodal" data-remodal-id="modal"> <button data-remodal-action="close" class="remodal-close"></button> <h1>Remodal</h1> <p> Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. </p> <br> <button data-remodal-action="cancel" class="remodal-cancel">Cancel</button> <button data-remodal-action="confirm" class="remodal-confirm">OK</button> </div>
不要使用ID属性,如果你想避免锚跳,用data-remodal-id.
所以,现在你可以用哈希函数调用它:
<a href="#modal">Call the modal with data-remodal-id="modal"</a>
或:
<a data-remodal-target="modal">Call the modal with data-remodal-id="modal"</a>
选项
您可以使用data-remodal-options属性传递其他选项。
<div class="remodal" data-remodal-id="modal" data-remodal-options="hashTracking: false, closeOnOutsideClick: false"> <button data-remodal-action="close" class="remodal-close"></button> <h1>Remodal</h1> <p> Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. </p> <br> <button data-remodal-action="cancel" class="remodal-cancel">Cancel</button> <button data-remodal-action="confirm" class="remodal-confirm">OK</button> </div>
关键词:模态窗,对话框,弹窗,弹出层,Remodal ,jquery,jquery插件
讨论这个项目 (16)
当前页面为只读展示,仅显示已审核留言;提交留言功能暂未开放。
为什么加载出来的自己模糊呢,打开f12一下就好了
感谢分享
点击遮罩层会关闭模态框怎么解决啊?
正是我需要的,在ipad上面开发HTML5使用
试试
很不错 ,好几个项目都用到了 ,谢谢
还不错
手下了