{"id":3862,"date":"2015-05-13T12:03:10","date_gmt":"2015-05-13T04:03:10","guid":{"rendered":"https:\/\/sdeno.com\/?p=3862"},"modified":"2015-05-20T14:47:43","modified_gmt":"2015-05-20T06:47:43","slug":"%e5%8d%95%e9%a1%b5%e5%85%a8%e5%b1%8f%e5%bc%b9%e7%aa%97%e6%95%88%e6%9e%9canimatedmodal-js-css3-%e5%85%a8%e5%b1%8f%e6%a8%a1%e6%80%81%e7%aa%97%e5%8f%a3","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=3862","title":{"rendered":"\u5355\u9875\u5168\u5c4f\u5f39\u7a97\u6548\u679canimatedModal.js \u2013 CSS3 \u5168\u5c4f\u6a21\u6001\u7a97\u53e3"},"content":{"rendered":"<p>\u9875\u9762\u8fc7\u6e21<\/p>\n<p>animatedModal.js\u6548\u679c\u4e5f\u57fa\u4e8eanimate.css\u5b8c\u6210<\/p>\n<p>HTML\uff1a<\/p>\n<pre> &lt;div id=\"<span style=\"color: #ff0000;\">modal-02<\/span>\"&gt;\r\n\r\n   &lt;div class=\"close-<span style=\"color: #ff0000;\">modal-02<\/span>\"&gt;  \/\/\u5173\u95ed\u7684class\u6ce8\u610f close-<span style=\"color: #ff0000;\">modal-02<\/span>\r\n    CLOSE MODAL\r\n   &lt;\/div&gt;\r\n   &lt;div class=\"modal-content\"&gt;\r\n\r\n   &lt;\/div&gt;\r\n\r\n &lt;\/div&gt;<\/pre>\n<p>\u7b80\u5355\u4ecb\u7ecd\u57fa\u672c\u53c2\u6570\uff1a<\/p>\n<pre>$(\"#demo02\").animatedModal({    \/\/ \u9ed8\u8ba4\u70b9\u51fb#demo02\u89e6\u53d1\r\n   modalTarget:'modal-02',      \/\/ \u5f39\u7a97\u7684ID\u540d\r\n   animatedIn:'lightSpeedIn',   \/\/\u5f39\u51fa\u6de1\u5165\u6548\u679c\r\n   animatedOut:'bounceOutDown', \/\/\u5173\u95ed\u65f6\u7684\u6de1\u51fa\u6548\u679c\r\n   color:'red',                 \/\/\u80cc\u666f\u989c\u8272\r\n   animationDuration:'2s',     \/\/\u8fc7\u6e21\u65f6\u95f4\r\n   overflow:'scroll',         \/\/\u662f\u5426\u8981\u6eda\u52a8\u6761\r\n \/\/ Callbacks\r\n beforeOpen: function() {     \/\/\u5f39\u51fa\u524d\u7684\u56de\u8c03\r\n   console.log(\"The animation was called\");\r\n }, \r\n afterOpen: function() {    \/\/\u5f39\u51fa\u540e\r\n   console.log(\"The animation is completed\");\r\n }, \r\n beforeClose: function() {  \/\/\u5173\u95ed\u524d\r\n   console.log(\"The animation was called\");\r\n }, \r\n afterClose: function() {    \/\/\u5173\u95ed\u540e\r\n   console.log(\"The animation is completed\");\r\n }\r\n });<\/pre>\n<p>&nbsp;<\/p>\n<p>\u9ed8\u8ba4\u53c2\u6570\uff1a<\/p>\n<table id=\"am-table\" class=\"table table-striped\" style=\"color: #333333;\">\n<thead style=\"color: #e74b3d;\">\n<tr>\n<th>Variable<\/th>\n<th>Default Value<\/th>\n<th>Options<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>modalTarget<\/td>\n<td>animatedModal<\/td>\n<td><\/td>\n<td>Customize your target<\/td>\n<\/tr>\n<tr>\n<td>color<\/td>\n<td>#39BEB9<\/td>\n<td>HEX, HSL, RGB, RBA<\/td>\n<td>Define background color<\/td>\n<\/tr>\n<tr>\n<td>animatedIn<\/td>\n<td>zoomIn<\/td>\n<td>Choose\u00a0<a style=\"color: grey;\" href=\"http:\/\/daneden.github.io\/animate.css\/\" target=\"_blank\">Here<\/a><\/td>\n<td>Transition when the modal goes in<\/td>\n<\/tr>\n<tr>\n<td>animatedOut<\/td>\n<td>zoomOut<\/td>\n<td>Choose\u00a0<a style=\"color: grey;\" href=\"http:\/\/daneden.github.io\/animate.css\/\" target=\"_blank\">Here<\/a><\/td>\n<td>Transition when the modal goes out<\/td>\n<\/tr>\n<tr>\n<td>animationDuration<\/td>\n<td>.6s<\/td>\n<td>seconds<\/td>\n<td>Animation duration<\/td>\n<\/tr>\n<tr>\n<td>overflow<\/td>\n<td>auto<\/td>\n<td>scroll; hidden; auto;<\/td>\n<td>This makes your modal scrollable or not<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b98\u7f51\uff1a<a href=\"http:\/\/joaopereirawd.github.io\/animatedModal.js\/\" target=\"_blank\">http:\/\/joaopereirawd.github.io\/animatedModal.js\/<\/a><\/p>\n<p><a href=\"http:\/\/pan.baidu.com\/s\/112awm\" target=\"_blank\">http:\/\/pan.baidu.com\/s\/112awm<\/a><\/p>\n<p>\u7c7b\u4f3c\u6548\u679c\uff1a<a href=\"http:\/\/www.jq22.com\/plugin\/830\" target=\"_blank\">http:\/\/www.jq22.com\/plugin\/830<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9875\u9762\u8fc7\u6e21 animatedModal.js\u6548\u679c\u4e5f\u57fa\u4e8eanimate.css\u5b8c\u6210 HTML\uff1a &lt;div i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-3862","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/3862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3862"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/3862\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}