popbox.js 介绍
Popbox.js是一个很小的JavaScript插件,用于创建可堆叠的模态。它是完全可定制的并且没有依赖。
安装
将popbox.css文件添加到html的头部。
将popbox.js文件添加到html的开头或紧接在body标记之前。
在popbox.js脚本标记之后添加此代码以初始化插件。
<script type="text/JavaScript">
var popbox = new Popbox({
blur:true,
overlay:true,
});
</script>
html范例
<div data-popbox-id="mypopbox1" class="popbox">
<div class="popbox_container">
Popbox content 1
<button data-popbox-close="mypopbox1">Close</button>
</div>
</div>
<div data-popbox-id="mypopbox2" class="popbox">
<div class="popbox_container">
Popbox content 2
</div>
<button data-popbox-close="mypopbox2">Close</button>
</div>
<div class="popbox_main_content">
Main content of the page
<button data-popbox-target="mypopbox1">
Open mypopbox 1
</button>
<button data-popbox-target="mypopbox2">
Open mypopbox 2
</button>
</div>
网站地址:https://oncebot.github.io/popbox.js/
GitHub:https://github.com/oncebot/popbox.js
网站描述:一个简单易用可堆的Web模态对话框
popbox.js
官方网站:https://oncebot.github.io/popbox.js/
小编说
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。