admin [—»Sói™~]-[Ðại Ma Ðầu]
Giới tính : Chinese zodiac : Bài viết : 1042 Xu : 158 Thanked : 650 Sinh Nhật : 20/09/1990 Tham Gia : 15/07/2011 Tuổi : 34 Yahoo : Hà Nội Nghề Nghiệp : Giáo Sư Status : hgfggggggggggggg
Character sheet Tài Sản:
| Tiêu đề: [Script] Ứng dụng xem ảnh với Fancybox Verssion 1 Fri Oct 28, 2011 12:26 pm | |
| Script Fancybox có tác dụng giúp bạn bắt được các loại ảnh tạo ra một hộp thoại hiển thị ảnh bạn click vào Ngoài ra còn rất nhiều chức năng có thể dùng Fancybox ứng dụng thêm Chèn vào CSS đoạn này: - Code:
-
#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index: 999;display:none;}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;z-index: 999;display:none;}#fancybox-tmp{border:0;overflow:auto;display:none;margin:0;padding:0;}#fancybox-wrap{position:absolute;top:0;left:0;z-index: 999;outline:none;display:none;padding:20px;}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff;}#fancybox-content{width:0;height:0;outline:none;position:relative;overflow:hidden;z-index: 999;border:0 solid #fff;padding:0;}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index: 999;}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png') -40px 0;cursor:pointer;z-index: 999;display:none;}#fancybox-error{color:#444;font:normal 12px/20px Arial;margin:0;padding:14px;}#fancybox-img{width:100%;height:100%;border:none;outline:none;line-height:0;vertical-align:top;margin:0;padding:0;}#fancybox-frame{width:100%;height:100%;border:none;display:block;}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/blank.gif');z-index: 999;display:none;}#fancybox-left{left:0;}#fancybox-right{right:0;}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index: 999;display:block;}#fancybox-left-ico{background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -30px;}#fancybox-right-ico{background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -60px;}#fancybox-left:hover,#fancybox-right:hover{visibility:visible;}#fancybox-left:hover span{left:20px;}#fancybox-right:hover span{left:auto;right:20px;}.fancybox-bg{position:absolute;border:0;width:20px;height:20px;z-index: 999;margin:0;padding:0;}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox-x.png');}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -162px;}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox-y.png');background-position:-20px 0;}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -182px;}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox-x.png');background-position:0 -20px;}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -142px;}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox-y.png');}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png');background-position:-40px -122px;}#fancybox-title{font-family:Helvetica;font-size:12px;z-index: 999;}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative;}.fancybox-title-outside{padding-top:10px;color:#fff;}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left;}#fancybox-title-over{background-image:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_title_over.png');display:block;padding:10px;}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px;}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto;}#fancybox-title-float-wrap td{border:none;white-space:nowrap;}#fancybox-title-float-left{background:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png') -40px -90px no-repeat;padding:0 0 0 15px;}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:700;background:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox-x.png') 0 -40px;padding:0 0 3px;}#fancybox-title-float-right{background:url('http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancybox.png') -55px -90px no-repeat;padding:0 0 0 15px;}.fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_close.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_nav_left.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_nav_right.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_title_over.png', sizingMethod='scale');zoom:1px;}.fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_title_left.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_title_main.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_title_right.png', sizingMethod='scale');}.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight + "px");}#fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) 0 ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) 0 'px');}#fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_loading.png', sizingMethod='scale');}.fancybox-ie .fancybox-bg{background:transparent !important;}.fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_n.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_ne.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_e.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_se.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_s.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_sw.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_w.png', sizingMethod='scale');}.fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://s1211.photobucket.com/albums/cc433/baivong/fancybox/fancy_shadow_nw.png', sizingMethod='scale');}.bv_ytb{background:#211c10 url(http://i27.servimg.com/u/f27/14/67/90/38/theadb10.gif);height:28px;font:bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;color:#FFF;text-align:center; text-shadow:green 0.1em 0.1em 0.2em;padding:5px 5px;} .ytb_bv{background:#000;align:justify;padding:5px 5px;} img.zoom {cursor: url("http://www.fileden.com/files/2010/4/14/2827429/zoom.cur"),progress;} .postbody img{max-width:450px;}
Tiếp theo vẫn ở header, thêm bên dưới: - Code:
-
<script src="{JQUERY_PATH}" type="text/javascript"></script> Cái này - Code:
-
<script src="http://www.starvn.tk/h42-Fancybox" type="text/javascript"></script> | |
|