所属分类:弹出层

jQuery弹出层插件支持animate.css

21008 浏览 194 收藏 2 留言
ie兼容12

插件描述

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

更新时间
2019-12-08 22:08
下载量
952
所需 JQ 币
0
分类
UI / 弹出层

详细内容

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弹出层插件,弹出层,animate.css,jquery,jquery插件

讨论这个项目 (2)

爱越团儿
absolute定位在移动端未加载完全有BUG
丶空白
不兼容移动端,不好意思

当前页面为只读展示,仅显示已审核留言;提交留言功能暂未开放。