图片/图形

支持 Animate 动画的jQuery弹出层插件

阿里云


jquery.popup.js 是一款支持 animate.css 动画效果的弹出层模态窗口插件。你可以在初始化插件时,配置模态窗口打开和关闭时的 CSS3 懂,使用非常炫酷和方便。

使用方法

在页面中引入下面的文件

也想出现在这里?联系我们
创客主机
  1. <link href="css/animate.css" rel="stylesheet"/>
  2. <script src="js/jquery.min.js" type="text/javascript"></script>
  3. <script src="js/jquery.popup.js"></script>

HTML 结构

  1. <div id="myModal" class="myModal">
  2.   <!-- Modal Content Here -->
  3.   <h3>Modal Title</h3>
  4.   <p>Modal Body</p>
  5.   <!-- Custom Close Button -->
  6.   <b class="myModal-close js-popup-close">x</b>
  7. </div>

CSS 样式

  1. .myModal {
  2.   max-width: 600px;
  3.   padding: 1em;
  4.   background: #eee;
  5.   display: none;
  6.   position: relative;
  7.   box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.15);
  8. }
  9. /*关闭按钮*/
  10. .item-close {
  11.   cursor: pointer;
  12.   right: 5px;
  13.   top: 5px;
  14.   position: absolute;
  15.   background: #222;
  16.   color: #fff;
  17.   border-radius: 100%;
  18.   font-size: 14px;
  19.   height: 24px;
  20.   line-height: 22px;
  21.   text-align: center;
  22.   width: 24px;
  23. }

初始化插件

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

配置参数

  1. $('#elem').popup({
  2.       background: "#000",
  3.       position: "absolute",
  4.       opacity: .5,
  5.       zIndex: 123456788,
  6.       classAnimateShow: '',  // animate class, link https://daneden.github.io/animate.css/
  7.       classAnimateHide: '',  // animate class, link https://daneden.github.io/animate.css/
  8.       time: 400,
  9.       onPopupClose: function(){},  // popup close after function
  10.       onPopupInit: function(){}  // popup init after function
  11. });

Github 网址:https://github.com/romamaslennikov/jquery.popup.js

支持 Animate 动画的 jQuery 弹出层插件

已有 399 人购买
  • n4eu
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(0)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!