jQuery弹出层插件支持animate.css

所属分类:UI-弹出层

 17682  193  查看评论 (2)
分享到微信朋友圈
X
jQuery弹出层插件支持animate.css ie兼容12

jQuery.popup.js

适用于您的应用程序的模态和弹出窗口。 支持animate.css。

使用方法

在页面中引入下面的文件。

<link href="css/animate.css" rel="stylesheet"/>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.popup.js"></script>

HTML结构

<div id="myModal" class="myModal">
  <!-- Modal Content Here -->
  <h3>Modal Title</h3>
  <p>Modal Body</p>
  <!-- Custom Close Button -->
  <b class="myModal-close js-popup-close">x</b>
</div>

CSS样式

.myModal {
  max-width: 600px;
  padding: 1em;
  background: #eee;
  display: none;
  position: relative;
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.15);
}
/*关闭按钮*/
.item-close {
  cursor: pointer;
  right: 5px;
  top: 5px;
  position: absolute;
  background: #222;
  color: #fff;
  border-radius: 100%;
  font-size: 14px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  width: 24px;
}

初始化插件

$('#elem').popup();

配置参数

$('#elem').popup({
      background: "#000",
      position: "absolute",
      opacity: .5,
      zIndex: 123456788,
      classAnimateShow: '',  // animate class, link https://daneden.github.io/animate.css/
      classAnimateHide: '',  // animate class, link https://daneden.github.io/animate.css/
      time: 400,
      onPopupClose: function(){},  // 功能后弹出窗口关闭
      onPopupInit: function(){}  // 函数后弹出 init
});
相关插件-弹出层

jQuery弹框、弹出层插件method.js

jq弹框 弹框标题、内容、宽高、取消确认按钮、关闭按钮、动效类型均可以参数的形式设置
  弹出层
 51379  398

移动端弹出层jquery插件简易

移动端弹出层jquery插件简易
  弹出层
 51568  334

jquery弹出框插件dialogbox

jquery弹出框插件dialogbox
  弹出层
 53144  317

超简单实用的弹窗jquery插件

兼容到ie8,简洁,实用,美观,可以自由更改弹窗样式。可以在弹窗中加上ajax请求的数据!
  弹出层
 98205  450

讨论这个项目(2)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    爱越团儿 0
    2020/12/26 20:53:50
    absolute定位在移动端未加载完全有BUG
        丶空白0
        2021/4/25 16:28:28
        不兼容移动端,不好意思
    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复