{"id":1013,"date":"2009-12-08T16:13:00","date_gmt":"2009-12-08T08:13:00","guid":{"rendered":"\/?p=1013"},"modified":"2009-12-08T16:13:00","modified_gmt":"2009-12-08T16:13:00","slug":"1013","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/front-end\/1013.html","title":{"rendered":"\u5f88\u7ecf\u5178\u7684\u56fe\u7247\u6548\u679c\uff1aLightbox\u548cFancyBox"},"content":{"rendered":"

        \u9002\u624d\u6709\u670b\u53cb\u95ee\u9053Kim Minji\u4f5c\u54c1\u6b23\u8d4f\u4e0a\u663e\u793a\u56fe\u7247\u7684\u6548\u679c\u662f\u600e\u4e48\u505a\u5230\u7684\uff0c\u4e8e\u662f\u8c08\u8d77\u4e86\u56fe\u7247\u663e\u793a\u7279\u6548\u6765\u3002\u6b66\u6c49\u767e\u5ea6\u63a8\u5e7f<\/font><\/strong><\/a><\/p>\n

        \u6211\u6240\u77e5\u9053\u7684\uff0c\u6bd4\u8f83\u7ecf\u5178\u7684\u5f53\u5c5e\u8fd9\u4e24\u4e2a\uff1aLightbox\u548cFancyBox\u3002\u4e0b\u9762\u4e00\u4e00\u6765\u4ecb\u7ecd\u7ed9\u670b\u53cb\u4eec\u3002<\/p>\n

       1. Lightbox                                   <\/p>\n

       \u6548\u679c\u9884\u89c8\uff1a<\/p>\n

        http:\/\/blog.designlinks.cn\/gallery<\/a>
        
http:\/\/www.flashpic.cn\/down\/code\/js\/lightbox-js-v2\/<\/a>
        
http:\/\/beach.blogbus.com\/logs\/3470001.html<\/a><\/p>\n

        \u5982\u4f55\u4f7f\u7528:
\u6b65\u9aa4 1 – \u5b89\u88c5
Lightbox v2.0 \u4f7f\u7528 Prototype \u6846\u67b6\u548c Scriptaculous \u6548\u679c\u5e93. \u4f60\u5c06\u9700\u8981\u5916\u8c03\u8fd9\u4e09\u4e2a Javascript \u6587\u4ef6\u5728\u4f60\u7684 header. <script type=”text\/javascript” src=”js\/prototype.js”><\/script>
<script type=”text\/javascript” src=”js\/scriptaculous.js?load=effects”><\/script>
<script type=”text\/javascript” src=”js\/lightbox.js”><\/script>
\u5916\u8c03 Lightbox CSS \u6587\u4ef6 (\u6216\u6dfb\u52a0 Lightbox \u6837\u5f0f\u5230\u4f60\u73b0\u884c\u7684\u6837\u5f0f\u8868\u4e2d). <link rel=”stylesheet” href=”css\/lightbox.css” type=”text\/css” media=”screen” \/>
\u68c0\u67e5 CSS \u5e76\u786e\u5b9a\u8c03\u7528\u7684 prev.gif \u548c next.gif \u6587\u4ef6\u5728\u6b63\u786e\u7684\u4f4d\u7f6e. \u540c\u6837\u8981\u786e\u5b9a\u8c03\u7528\u7684 loading.gif \u548c close.gif \u6587\u4ef6\u53ca lightbox.js \u6587\u4ef6\u5728\u6b63\u786e\u7684\u4f4d\u7f6e.
\u6b65\u9aa4 2 – \u6fc0\u6d3b
\u6dfb\u52a0 rel=”lightbox” \u5c5e\u6027\u5230\u4efb\u4f55\u4e00\u4e2a\u94fe\u63a5\u6807\u7b7e\u53bb\u6fc0\u6d3blightbox. \u4f8b\u5982: <a href=”images\/image-1.jpg” rel=”lightbox” title=”my caption”>image #1<\/a>
\u53ef\u9009\u62e9\u9879: \u4f7f\u7528 title \u5c5e\u6027\u52a0\u4e0a\u8bf4\u660e.
\u5982\u679c\u4f60\u6709\u4e00\u5957\u4f60\u60f3\u5206\u7ec4\u7684\u76f8\u5173\u56fe\u7247, \u63a5\u7740\u4e0a\u4e00\u90e8\u5e76\u4e14\u53c8\u5728 rel \u5c5e\u6027\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u5e26\u65b9\u62ec\u53f7\u7684\u7ec4\u540d. \u4f8b\u5982: <a href=”images\/image-1.jpg” rel=”lightbox[roadtrip]“>image #1<\/a>
<a href=”images\/image-2.jpg” rel=”lightbox[roadtrip]“>image #2<\/a>
<a href=”images\/image-3.jpg” rel=”lightbox[roadtrip]“>image #3<\/a>
\u6ca1\u6709\u9650\u5b9a\u6bcf\u4e2a\u9875\u9762\u7684\u56fe\u7247\u7ec4\u6570\u91cf\u548c\u6bcf\u4e2a\u56fe\u7247\u7ec4\u56fe\u7247\u7684\u6570\u91cf. \u75af\u4e86\uff01<\/p>\n

        \u4e0b\u8f7dLightbox\uff1ahttp:\/\/www.flashpic.cn\/code\/jscode_2.html<\/a><\/p>\n

          2. FancyBox<\/p>\n

         \u6548\u679c\u9884\u89c8\uff1a<\/p>\n

         http:\/\/flashpic.cn\/down\/code\/js\/jquery.fancybox-1.2.1\/<\/a><\/p>\n

        \u7b80\u4ecb\uff1a              \u6b66\u6c49\u767e\u5ea6\u516c\u53f8<\/font><\/strong><\/a><\/p>\n

        FancyBox\u662f\u4e00\u6b3e\u57fa\u4e8ejquery\u5f00\u53d1\u7684\u7c7bLightbox\u63d2\u4ef6\u3002\u652f\u6301\u5bf9\u653e\u5927\u7684\u56fe\u7247\u6dfb\u52a0\u9634\u5f71\u6548\u679c\uff0c\u5bf9\u4e8e\u4e00\u7ec4\u76f8\u5173\u7684\u56fe\u7247\u6dfb\u52a0\u5bfc\u822a\u64cd\u4f5c\u6309\u7ebd\uff0c\u8be5lightbox\u9664\u4e86\u80fd\u591f\u5c55\u793a\u56fe\u7247\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u5c55\u793aiframed\u5185\u5bb9\uff0c \u901a\u8fc7css\u81ea\u5b9a\u4e49\u5916\u89c2\u3002<\/p>\n

         \u76f8\u5bf9\u4e0eLightbox\u800c\u8a00\uff0c\u9634\u5f71\u6548\u679c\u66f4\u597d\u3002\u4f46\u662f\u6bd4Lightbox\u7eda\u4e3d\u3002<\/p>\n

         \u4f7f\u7528\u5f88\u662f\u7b80\u5355\uff0c\u53ef\u4ee5\u53c2\u7167Lightbox\uff0c\u4fee\u6539\u6dfb\u52a0\u4ee3\u7801\u3002<\/p>\n

         \u4e0b\u8f7d\u53ca\u66f4\u591a\u4ecb\u7ecd\uff1a<\/p>\n

          http:\/\/www.flashpic.cn\/code\/jscode_7.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

        \u9002\u624d\u6709\u670b\u53cb\u95ee\u9053Kim Minji\u4f5c\u54c1\u6b23\u8d4f\u4e0a\u663e\u793a\u56fe\u7247\u7684\u6548\u679c\u662f\u600e\u4e48\u505a\u5230\u7684\uff0c\u4e8e\u662f\u8c08\u8d77\u4e86\u56fe\u7247\u663e\u793a\u7279\u6548\u6765\u3002\u6b66\u6c49\u767e\u5ea6\u63a8\u5e7f<\/font><\/strong><\/a><\/p>\n

        \u6211\u6240\u77e5\u9053\u7684\uff0c\u6bd4\u8f83\u7ecf\u5178\u7684\u5f53\u5c5e\u8fd9\u4e24\u4e2a\uff1aLightbox\u548cFancyBox\u3002\u4e0b\u9762\u4e00\u4e00\u6765\u4ecb\u7ecd\u7ed9\u670b\u53cb\u4eec\u3002<\/p>\n

       1. Lightbox      <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1013"}],"collection":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/comments?post=1013"}],"version-history":[{"count":0,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1013\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/media?parent=1013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/categories?post=1013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/tags?post=1013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}