mirror of https://github.com/layui/layer
1.8.4
parent
4249816f86
commit
fba5101df8
16
README.md
16
README.md
|
@ -23,6 +23,22 @@ layer遵循于LGPL开源协议,她是一枚可以让你想到即可做到的
|
|||
|
||||
事实上我们无法获取到更多案例,所以如果您有大型项目也在使用layer,您可以联系作者,以便在layer官网展现,也为您的品牌推广尽一些绵薄之力。
|
||||
|
||||
## 日志
|
||||
【1.8.4更新日志】
|
||||
# 新增浏览器窗口尺寸改变时的自适应定位
|
||||
# 新增属性shift,用于配置动画弹出(需要注意的是,之前的layer.shift()方法将在layer1.9遗弃,用shift属性取代)
|
||||
# 新增方法layer.title(name, index); 用于动态改变层的标题。
|
||||
# 修改弹出层默认初始坐标为垂直左右居中。
|
||||
# 开放多个tips,可通过配置tips: {more: true}开启。
|
||||
# 进一步完善tips的智能定位。
|
||||
# 放弃layer.ready方法,用jQuery的ready取代。
|
||||
# 进一步优化内部代码
|
||||
|
||||
== 拓展模块 ==
|
||||
# layer.prompt支持给表单传入默认值,如layer.prompt({val:'默认'}); 新增yes回调函数第二个参数为索引、第三个参数为表单元素。
|
||||
# 相册层新增tab回调函数,用于切换图片时进行相关操作
|
||||
# 相册层内部代码优化。
|
||||
|
||||
|
||||
## 备注
|
||||
[官网](http://sentsin.com/jquery/layer/)、[更新日志](https://github.com/sentsin/layer/blob/master/Update%20Notes.txt)、[Say交流](http://say.sentsin.com/home-48.html)、[商业支持](http://url.cn/RAejZY)
|
|
@ -1,57 +0,0 @@
|
|||
【1.8.3更新日志】2014-6-4
|
||||
1、新增遮罩层fadeIn淡入。
|
||||
2、修复设置border:[0]时,最大/小化的小bug
|
||||
3、修复layer.area潜在的一个非常小的bug
|
||||
4、优化代码结构
|
||||
|
||||
【1.8.2更新日志】2014-5-27
|
||||
1、优化核心代码
|
||||
2、修复了两个潜在的小小小bug
|
||||
|
||||
【1.8.1更新日志】2014-5-16
|
||||
1、紧急修复ie7下无法显示关闭按钮的bug
|
||||
2、紧急修复ie6最小化按钮高度稍微溢出的bug
|
||||
3、去掉layer.css的reset,以避免可能存在的样式冲突
|
||||
|
||||
【1.8.0更新日志】2014-5-15
|
||||
|
||||
01、新增窗口最小化/全屏/还原功能,通过配置参数 maxmin:true,不开启不用配置。本功能只针对普通页面层(type:1)和iframe层(type:2)有效。另外还需注意一点,参数area一旦配置%,将不会输出此项图标。
|
||||
02、新增窗口最小化回调函数min: function(index){}
|
||||
03、新增窗口全屏回调函数full: function(index){}
|
||||
04、新增窗口还原回调函数restore: function(index){}
|
||||
05、新增方法layer.min(index, options)/layer.full(index, options)/layer.restore(index),分别用于外部设置新增窗口最小化/全屏/还原
|
||||
06、iframe层新增一个scrolling参数,用于控制是否显示滚动条。默认自动,如果想不显示,配置 iframe: {scrolling: 'no'} 即可
|
||||
07、layer.shift方法增加一个stop参数,用于设置是否动画到最顶部。如layer.shift('bottom', 500, 1)则表示从最顶部动画到指定坐标。
|
||||
|
||||
08、优化IE6-8下拖动iframe层一卡一卡的问题
|
||||
09、优化在IE低版本下的内存占用问题。
|
||||
10、优化内部代码。
|
||||
|
||||
11、修复layer.load('文字',time)第二个参数不能倒计时关闭的小bug
|
||||
12、修复ie个别版本的低级浏览器,第二次弹出iframe层时,无法获取焦点的bug
|
||||
13、修改弹出动画到offset设定好的位置,不再只是在边缘。
|
||||
14、修复layer.autoArea(index)的重大bug
|
||||
15、修复当fix设为false时,layer.shift动画弹出的bug。
|
||||
16、修复layer.use无法正确执行回调的bug
|
||||
|
||||
17、layer.shift不再对ie6提供支持。
|
||||
18、为了规范统一性,关闭loading加载层的方法:layer.loadClose()改成layer.closeLoad()
|
||||
19、对layer所需要的icon做了预先加载
|
||||
20、layer.use支持加载外部的css/js
|
||||
|
||||
【拓展模块】
|
||||
提示:相册支持左右方向键切换,以及ESC键关闭。
|
||||
21、新增layer.photos(options),以实现图片的相册模式浏览。支持获取页面指定区域所有图片、支持异步请求过来的json数据
|
||||
22、新增layer.photosPage(options),用于相册模式查看页面指定区域的所有图片。
|
||||
23、新增layer.ext = function(){}回调方法,用于首次加载layer.ext.js时立即执行拓展层。
|
||||
24、layer.prompt方法新增title和length参数,title用于自定义标题,length用于文本框的字数。如:layer.prompt({title:'helllo prompt', title: 300});
|
||||
25、layer.tab方法新增offset参数,用于控制坐标
|
||||
|
||||
|
||||
|
||||
【小提示:如果亲们觉得layer对你有所帮助,可以去layer官网适当点击下广告支持一下。】
|
||||
官网: http://sentsin.com/jquery/layer/
|
||||
日志:http://say.sentsin.com/say-706.html
|
||||
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
|
||||
@Name: layer拓展类,依赖于layer
|
||||
@Date: 2014.05.16
|
||||
@Date: 2014.07.04
|
||||
@Author: 贤心
|
||||
@Versions:1.3
|
||||
@Versions:1.8.4-ext
|
||||
@Api:http://sentsin.com/jquery/layer
|
||||
@Desc: 本拓展会持续更新
|
||||
|
||||
|
@ -13,13 +13,10 @@ layer.use('skin/layer.ext.css', function(){
|
|||
layer.ext && layer.ext();
|
||||
});
|
||||
|
||||
layer.extv = '1.3';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
系统prompt
|
||||
2014.5.11
|
||||
By 贤心
|
||||
|
||||
**/
|
||||
|
@ -27,7 +24,7 @@ layer.extv = '1.3';
|
|||
layer.prompt = function(parme, yes, no){
|
||||
var log = {}, parme = parme || {}, conf = {
|
||||
area: ['auto', 'auto'],
|
||||
offset: [parme.top || '200px', ''],
|
||||
offset: [parme.top || '', ''],
|
||||
title: parme.title || '信息',
|
||||
dialog: {
|
||||
btns: 2,
|
||||
|
@ -40,7 +37,7 @@ layer.prompt = function(parme, yes, no){
|
|||
} else {
|
||||
return 'text';
|
||||
}
|
||||
}() +'" class="xubox_prompt xubox_form" id="xubox_prompt" value="" />',
|
||||
}() +'" class="xubox_prompt xubox_form" id="xubox_prompt" value="'+ (parme.val || '') +'" />',
|
||||
yes: function(index){
|
||||
var val = log.prompt.val();
|
||||
if(val === ''){
|
||||
|
@ -48,8 +45,7 @@ layer.prompt = function(parme, yes, no){
|
|||
} else if(val.replace(/\s/g, '').length > (parme.length || 1000)) {
|
||||
layer.tips('最多输入'+ (parme.length || 1000) +'个字数', '#xubox_prompt', 2);
|
||||
} else {
|
||||
layer.close(index);
|
||||
yes && yes(val);
|
||||
yes && yes(val, index, log.prompt);
|
||||
}
|
||||
|
||||
}, no: no
|
||||
|
@ -66,8 +62,7 @@ layer.prompt = function(parme, yes, no){
|
|||
|
||||
/**
|
||||
|
||||
tab层 v1.0.0
|
||||
2014.5.11
|
||||
tab层
|
||||
By 贤心
|
||||
|
||||
**/
|
||||
|
@ -77,6 +72,7 @@ layer.tab = function(parme){
|
|||
type: 1,
|
||||
border: [0],
|
||||
area: ['auto', 'auto'],
|
||||
bgcolor: '',
|
||||
title: false,
|
||||
shade : parme.shade,
|
||||
offset: parme.offset,
|
||||
|
@ -131,8 +127,7 @@ layer.tab = function(parme){
|
|||
|
||||
/**
|
||||
|
||||
相册层 v1.0.0
|
||||
2014.5.11
|
||||
相册层
|
||||
By 贤心
|
||||
|
||||
**/
|
||||
|
@ -171,7 +166,7 @@ layer.photos = function(options){
|
|||
log.pid = nowimg.attr('pid');
|
||||
log.imgLen = imgs.length;
|
||||
log.imgsname = (page.title || '');
|
||||
log.name = nowimg.attr('layer-pname');
|
||||
log.name = nowimg.attr('alt');
|
||||
log.imgIndex = page.start + 1;
|
||||
}
|
||||
|
||||
|
@ -215,7 +210,6 @@ layer.photos = function(options){
|
|||
img.load(function(){
|
||||
log.imgarea = [img.outerWidth(), img.outerHeight()];
|
||||
log.resize(layero);
|
||||
options.success && options.success(json || page);
|
||||
});
|
||||
|
||||
log.event();
|
||||
|
@ -288,7 +282,7 @@ layer.photos = function(options){
|
|||
var thisimg = imgs.eq(log.imgIndex - 1);
|
||||
src = thisimg.attr('layer-img') || thisimg.attr('src');
|
||||
pid = thisimg.attr('layer-pid') || '';
|
||||
name = thisimg.attr('layer-pname') || '';
|
||||
name = thisimg.attr('alt') || '';
|
||||
}
|
||||
log.imgs.attr({
|
||||
src: src,
|
||||
|
@ -297,6 +291,7 @@ layer.photos = function(options){
|
|||
});
|
||||
log.imgtit.find('em').text(log.imgIndex + '/' + log.imgLen);
|
||||
log.imgsee.show();
|
||||
options.tab && options.tab({pid: pid, name: name});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
340
layer.js
340
layer.js
|
@ -1,8 +1,8 @@
|
|||
/**************************************************************
|
||||
|
||||
@Name:layer v1.8.3 弹层组件开发版
|
||||
@Name:layer v1.8.4 弹层组件开发版
|
||||
@Author:贤心
|
||||
@Date:2014-06-04
|
||||
@Date:2014-07-07
|
||||
@Blog:http://sentsin.com
|
||||
@QQ群:78803422 (layer组件群3)
|
||||
@Copyright:Sentsin Xu(贤心)
|
||||
|
@ -14,18 +14,13 @@
|
|||
;!function(window, undefined){
|
||||
"use strict";
|
||||
|
||||
var pathType = true, //是否采用自动获取绝对路径。false:将采用下述变量中的配置
|
||||
pathUrl = '/lily/lib/layer/', //上述变量为false才有效,当前layerjs所在目录(不用填写host,相对站点的根目录即可)。
|
||||
var path = '', //组件存放目录,为空表示自动获取(不用填写host,相对站点的根目录即可)。
|
||||
|
||||
$, win, ready = {
|
||||
host: 'http://' + location.host,
|
||||
getPath: function(){
|
||||
var js = document.scripts, jsPath = js[js.length - 1].src;
|
||||
if(pathType){
|
||||
return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
|
||||
} else {
|
||||
return this.host + pathUrl;
|
||||
}
|
||||
return path ? ready.host + path : jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
|
||||
},
|
||||
|
||||
//五种原始层模式
|
||||
|
@ -34,7 +29,7 @@ $, win, ready = {
|
|||
|
||||
//默认内置方法。
|
||||
window.layer = {
|
||||
v: '1.8.3', //版本号
|
||||
v: '1.8.4',
|
||||
ie6: !-[1,] && !window.XMLHttpRequest,
|
||||
index: 0,
|
||||
path: ready.getPath(),
|
||||
|
@ -64,10 +59,6 @@ window.layer = {
|
|||
}
|
||||
},
|
||||
|
||||
ready: function(callback){
|
||||
layer.use('skin/layer.css', callback);
|
||||
},
|
||||
|
||||
alert: function(msg, icon, fn, yes){
|
||||
var isfn = (typeof fn === 'function'), conf = {
|
||||
dialog: {msg: msg, type: icon, yes: isfn ? fn : yes},
|
||||
|
@ -95,8 +86,8 @@ window.layer = {
|
|||
};
|
||||
if(typeof parme === 'object'){
|
||||
conf.dialog.type = parme.type;
|
||||
conf.shade = parme.shade;
|
||||
conf.success = function(){layer.shift(parme.rate)};
|
||||
conf.shade = parme.shade;
|
||||
conf.shift = parme.rate;
|
||||
} else if(typeof parme === 'function') {
|
||||
conf.end = parme
|
||||
} else {
|
||||
|
@ -115,7 +106,7 @@ window.layer = {
|
|||
loading: {type : icon},
|
||||
bgcolor: icon ? '#fff' : '',
|
||||
shade: icon ? [0.1, '#000'] : [0],
|
||||
border: (icon === 3 || !icon) ? false : [6, 0.3, '#000'],
|
||||
border: (icon === 3 || !icon) ? [0] : [6, 0.3, '#000'],
|
||||
type : 3,
|
||||
title : ['',false],
|
||||
closeBtn : [0 , false]
|
||||
|
@ -125,23 +116,28 @@ window.layer = {
|
|||
|
||||
//tips层快捷引用
|
||||
tips: function(html, follow, parme, maxWidth, guide, style){
|
||||
var conf = {type: 4, shade: false, success: function(layerE){
|
||||
if(!this.closeBtn){
|
||||
layerE.find('.xubox_tips').css({'padding-right': 10});
|
||||
}
|
||||
}, bgcolor:'', tips:{msg: html, follow: follow}};
|
||||
var conf = {
|
||||
type: 4, shade: false,
|
||||
success: function(layero){
|
||||
if(!this.closeBtn){
|
||||
layero.find('.xubox_tips').css({'padding-right': 10});
|
||||
}
|
||||
},
|
||||
bgcolor:'', tips: {msg: html, follow: follow}
|
||||
};
|
||||
conf.time = typeof parme === 'object' ? parme.time : (parme|0);
|
||||
parme = parme || {};
|
||||
conf.time = parme.time || parme;
|
||||
conf.closeBtn = parme.closeBtn || false
|
||||
conf.maxWidth = parme.maxWidth || maxWidth;
|
||||
conf.tips.guide = parme.guide || guide;
|
||||
conf.tips.style = parme.style || style;
|
||||
conf.tips.more = parme.more;
|
||||
return $.layer(conf);
|
||||
}
|
||||
};
|
||||
|
||||
//缓存常用字符
|
||||
var doms = {lay: 'xubox_layer', ifr: 'xubox_iframe', title: '.xubox_title', text: '.xubox_text', page: '.xubox_page'};
|
||||
var doms = ['xubox_layer', 'xubox_iframe', '.xubox_title', '.xubox_text', '.xubox_page', '.xubox_main'];
|
||||
|
||||
var Class = function(setings){
|
||||
var that = this, config = that.config;
|
||||
|
@ -159,15 +155,13 @@ var Class = function(setings){
|
|||
Class.pt = Class.prototype;
|
||||
|
||||
//默认配置
|
||||
Class.pt.config = layer.config || {
|
||||
Class.pt.config = {
|
||||
type: 0,
|
||||
shade: [0.3, '#000'],
|
||||
shadeClose: false,
|
||||
fix: true,
|
||||
move: '.xubox_title',
|
||||
moveOut: false,
|
||||
title: ['信息', true],
|
||||
offset: ['200px', '50%'],
|
||||
offset: ['', '50%'],
|
||||
area: ['310px', 'auto'],
|
||||
closeBtn: [0, true],
|
||||
time: 0,
|
||||
|
@ -175,8 +169,7 @@ Class.pt.config = layer.config || {
|
|||
border: [6, 0.3, '#000'],
|
||||
zIndex: 19891014,
|
||||
maxWidth: 400,
|
||||
dialog: {btns : 1, btn : ['确定','取消'], type : 8, msg : '', yes : function(index){ layer.close(index);}, no : function(index){ layer.close(index);}
|
||||
},
|
||||
dialog: {btns: 1, btn: ['确定','取消'], type : 8, msg: '', yes: function(index){layer.close(index);}, no: function(index){layer.close(index);}},
|
||||
page: {dom: '#xulayer', html: '', url: ''},
|
||||
iframe: {src: 'http://sentsin.com', scrolling: 'auto'},
|
||||
loading: {type: 0},
|
||||
|
@ -193,13 +186,12 @@ Class.pt.space = function(html){
|
|||
frame = [
|
||||
'<div class="xubox_dialog">'+ ico +'<span class="xubox_msg xubox_text" style="'+ (ico ? '' : 'padding-left:20px') +'">' + dialog.msg + '</span></div>',
|
||||
'<div class="xubox_page">'+ html +'</div>',
|
||||
'<iframe scrolling="'+ config.iframe.scrolling +'" allowtransparency="true" id="'+ doms.ifr +''+ times +'" name="'+ doms.ifr +''+ times +'" onload="this.className=\''+ doms.ifr +'\'" class="'+ doms.ifr +'" frameborder="0" src="' + config.iframe.src + '"></iframe>',
|
||||
'<iframe scrolling="'+ config.iframe.scrolling +'" allowtransparency="true" id="'+ doms[1] +''+ times +'" name="'+ doms[1] +''+ times +'" onload="this.className=\''+ doms[1] +'\'" class="'+ doms[1] +'" frameborder="0" src="' + config.iframe.src + '"></iframe>',
|
||||
'<span class="xubox_loading xubox_loading_'+ config.loading.type +'"></span>',
|
||||
'<div class="xubox_tips" style="'+ config.tips.style[0] +'"><div class="xubox_tipsMsg">'+ config.tips.msg +'</div><i class="layerTipsG"></i></div>'
|
||||
],
|
||||
shade = '' , border = '', zIndex = config.zIndex + times,
|
||||
shadeStyle = 'z-index:'+ zIndex +'; background-color:'+ config.shade[1] +'; opacity:'+ config.shade[0] +'; filter:alpha(opacity='+ config.shade[0]*100 +');';
|
||||
|
||||
config.shade[0] && (shade = '<div times="'+ times +'" id="xubox_shade' + times + '" class="xubox_shade" style="'+ shadeStyle +'"></div>');
|
||||
|
||||
config.zIndex = zIndex;
|
||||
|
@ -213,8 +205,8 @@ Class.pt.space = function(html){
|
|||
|
||||
config.title[1] && (title = '<div class="xubox_title"><em>' + config.title[0] + '</em></div>');
|
||||
return [shade,
|
||||
'<div times="'+ times +'" showtime="'+ config.time +'" style="z-index:'+ zIndex +'" id="'+ doms.lay +''+ times
|
||||
+'" class="'+ doms.lay +'">'
|
||||
'<div times="'+ times +'" showtime="'+ config.time +'" style="z-index:'+ zIndex +'" id="'+ doms[0] +''+ times
|
||||
+'" class="'+ doms[0] +'">'
|
||||
+ '<div style="background-color:'+ config.bgcolor +'; z-index:'+ zIndex +'" class="xubox_main">'
|
||||
+ frame[config.type]
|
||||
+ title
|
||||
|
@ -240,7 +232,7 @@ Class.pt.creat = function(){
|
|||
switch(config.type){
|
||||
case 0:
|
||||
config.title[1] || (config.area = ['auto','auto']);
|
||||
$('.xubox_dialog')[0] && layer.close($('.xubox_dialog').parents('.'+ doms.lay).attr('times'));
|
||||
$('.xubox_dialog')[0] && layer.close($('.xubox_dialog').parents('.'+ doms[0]).attr('times'));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
@ -255,7 +247,7 @@ Class.pt.creat = function(){
|
|||
page.ok && page.ok(datas);
|
||||
});
|
||||
} else {
|
||||
if($(page.dom).parents(doms.page).length == 0){
|
||||
if($(page.dom).parents(doms[4]).length == 0){
|
||||
setSpace();
|
||||
$(page.dom).show().wrap($(space[1]));
|
||||
} else {
|
||||
|
@ -268,7 +260,7 @@ Class.pt.creat = function(){
|
|||
config.title = [];
|
||||
config.area = ['auto', 'auto'];
|
||||
config.closeBtn = ['', false];
|
||||
$('.xubox_loading')[0] && layer.close($('.xubox_loading').parents('.'+ doms.lay).attr('times'));
|
||||
$('.xubox_loading')[0] && layer.closeLoad();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
@ -276,7 +268,7 @@ Class.pt.creat = function(){
|
|||
config.area = ['auto', 'auto'];
|
||||
config.fix = false;
|
||||
config.border = [0];
|
||||
$('.xubox_tips')[0] && layer.close($('.xubox_tips').parents('.'+ doms.lay).attr('times'));
|
||||
config.tips.more || layer.closeTips();
|
||||
break;
|
||||
};
|
||||
if(config.type !== 1){
|
||||
|
@ -284,26 +276,9 @@ Class.pt.creat = function(){
|
|||
body.append($(space[1]));
|
||||
}
|
||||
|
||||
var layerE = that.layerE = $('#'+ doms.lay + times);
|
||||
|
||||
//设置layer面积坐标等数据
|
||||
if(config.offset[0].indexOf("px") != -1){
|
||||
that.offsetTop = parseFloat(config.offset[0]);
|
||||
} else {
|
||||
that.offsetTop = parseFloat(config.offset[0])/100 * win.height();
|
||||
}
|
||||
that.offsetTop = that.offsetTop + config.border[0] + (config.fix ? 0 : win.scrollTop());
|
||||
if(config.offset[1].indexOf("px") != -1){
|
||||
that.offsetLeft = parseFloat(config.offset[1]) + config.border[0];
|
||||
} else {
|
||||
config.offset[1] = config.offset[1] === '' ? '50%' : config.offset[1];
|
||||
if(config.offset[1] === '50%'){
|
||||
that.offsetLeft = config.offset[1];
|
||||
}else{
|
||||
that.offsetLeft = parseFloat(config.offset[1])/100 * win.width() + config.border[0];
|
||||
}
|
||||
};
|
||||
layerE.css({left: that.offsetLeft, top: that.offsetTop, width: config.area[0], height: config.area[1]});
|
||||
var layerE = that.layerE = $('#'+ doms[0] + times);
|
||||
|
||||
layerE.css({width: config.area[0], height: config.area[1]});
|
||||
config.fix || layerE.css({position: 'absolute'});
|
||||
|
||||
//配置按钮
|
||||
|
@ -340,40 +315,84 @@ ready.fade = function(obj, time, opa){
|
|||
obj.css({opacity: 0}).animate({opacity: opa}, time);
|
||||
};
|
||||
|
||||
//计算坐标
|
||||
Class.pt.offset = function(){
|
||||
var that = this, config = that.config, layerE = that.layerE, laywid = layerE.outerHeight();
|
||||
if(config.offset[0] === '' && laywid < win.height()){
|
||||
that.offsetTop = (win.height() - laywid - 2*config.border[0])/2;
|
||||
}else if(config.offset[0].indexOf("px") != -1){
|
||||
that.offsetTop = parseFloat(config.offset[0]);
|
||||
} else {
|
||||
that.offsetTop = parseFloat(config.offset[0]||0)/100 * win.height();
|
||||
}
|
||||
that.offsetTop = that.offsetTop + config.border[0] + (config.fix ? 0 : win.scrollTop());
|
||||
if(config.offset[1].indexOf("px") != -1){
|
||||
that.offsetLeft = parseFloat(config.offset[1]) + config.border[0];
|
||||
} else {
|
||||
config.offset[1] = config.offset[1] === '' ? '50%' : config.offset[1];
|
||||
if(config.offset[1] === '50%'){
|
||||
that.offsetLeft = config.offset[1];
|
||||
}else{
|
||||
that.offsetLeft = parseFloat(config.offset[1])/100 * win.width() + config.border[0];
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
//初始化骨架
|
||||
Class.pt.set = function(times){
|
||||
var that = this, layerE = that.layerE, layerTitle = layerE.find(doms.title);
|
||||
var config = that.config, dialog = config.dialog, page = config.page, loading = config.loading;
|
||||
var that = this;
|
||||
var config = that.config;
|
||||
var dialog = config.dialog;
|
||||
var page = config.page;
|
||||
var loading = config.loading;
|
||||
var layerE = that.layerE;
|
||||
var layerTitle = layerE.find(doms[2]);
|
||||
|
||||
that.autoArea(times);
|
||||
|
||||
if(config.title[1]){
|
||||
if(config.type === 0){
|
||||
layer.ie6 && layerTitle.css({width : layerE.outerWidth()});
|
||||
}
|
||||
}else{
|
||||
config.type != 4 && layerE.find('.xubox_close').addClass('xubox_close1');
|
||||
config.type !== 4 && layerE.find('.xubox_close').addClass('xubox_close1');
|
||||
};
|
||||
|
||||
layerE.attr({'type' : ready.type[config.type]});
|
||||
|
||||
that.offset();
|
||||
|
||||
//判断是否动画弹出
|
||||
if(config.type !== 4){
|
||||
if(config.shift && !layer.ie6){
|
||||
if(typeof config.shift === 'object'){
|
||||
that.shift(config.shift[0], config.shift[1]||500, config.shift[2]);
|
||||
} else {
|
||||
that.shift(config.shift, 500);
|
||||
}
|
||||
} else {
|
||||
layerE.css({top: that.offsetTop, left: that.offsetLeft});
|
||||
}
|
||||
}
|
||||
|
||||
switch(config.type){
|
||||
case 0:
|
||||
layerE.find('.xubox_main').css({'background-color': '#fff'});
|
||||
layerE.find(doms[5]).css({'background-color': '#fff'});
|
||||
if(config.title[1]){
|
||||
layerE.find(doms.text).css({paddingTop: 18 + layerTitle.outerHeight()});
|
||||
layerE.find(doms[3]).css({paddingTop: 18 + layerTitle.outerHeight()});
|
||||
}else{
|
||||
layerE.find('.xubox_msgico').css({top: 8});
|
||||
layerE.find(doms.text).css({marginTop : 11});
|
||||
layerE.find(doms[3]).css({marginTop : 11});
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
layerE.find(page.dom).addClass('layer_pageContent');
|
||||
config.shade[0] && layerE.css({zIndex: config.zIndex + 1});
|
||||
config.title[1] && layerE.find(doms.page).css({top: layerTitle.outerHeight()});
|
||||
config.title[1] && layerE.find(doms[4]).css({top: layerTitle.outerHeight()});
|
||||
break;
|
||||
|
||||
case 2:
|
||||
var iframe = layerE.find('.'+ doms.ifr), heg = layerE.height();
|
||||
var iframe = layerE.find('.'+ doms[1]), heg = layerE.height();
|
||||
iframe.addClass('xubox_load').css({width: layerE.width()});
|
||||
config.title[1] ? iframe.css({top: layerTitle.height(), height: heg - layerTitle.height()}) : iframe.css({top: 0, height : heg});
|
||||
layer.ie6 && iframe.attr('src', config.iframe.src);
|
||||
|
@ -393,17 +412,26 @@ Class.pt.set = function(times){
|
|||
fowo.tipColor = config.tips.style[1];
|
||||
layArea[0] = layerE.outerWidth();
|
||||
|
||||
fowo.autoLeft = function(){
|
||||
if(fowo.left + layArea[0] - win.width() > 0){
|
||||
fowo.tipLeft = fowo.left + fowo.width - layArea[0];
|
||||
tipsG.css({right: 12, left: 'auto'});
|
||||
} else {
|
||||
fowo.tipLeft = fowo.left;
|
||||
};
|
||||
};
|
||||
|
||||
//辨别tips的方位
|
||||
fowo.where = [function(){ //上
|
||||
fowo.tipLeft = fowo.left;
|
||||
fowo.where = [function(){ //上
|
||||
fowo.autoLeft();
|
||||
fowo.tipTop = fowo.top - layArea[1] - 10;
|
||||
tipsG.removeClass('layerTipsB').addClass('layerTipsT').css({'border-right-color': fowo.tipColor});
|
||||
tipsG.removeClass('layerTipsB').addClass('layerTipsT').css({'border-right-color': fowo.tipColor});
|
||||
}, function(){ //右
|
||||
fowo.tipLeft = fowo.left + fowo.width + 10;
|
||||
fowo.tipTop = fowo.top;
|
||||
tipsG.removeClass('layerTipsL').addClass('layerTipsR').css({'border-bottom-color': fowo.tipColor});
|
||||
}, function(){ //下
|
||||
fowo.tipLeft = fowo.left;
|
||||
fowo.autoLeft();
|
||||
fowo.tipTop = fowo.top + fowo.height + 10;
|
||||
tipsG.removeClass('layerTipsT').addClass('layerTipsB').css({'border-right-color': fowo.tipColor});
|
||||
}, function(){ //左
|
||||
|
@ -416,12 +444,14 @@ Class.pt.set = function(times){
|
|||
/* 8*2为小三角形占据的空间 */
|
||||
if(config.tips.guide === 0){
|
||||
fowo.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && fowo.where[2]();
|
||||
} else if (config.tips.guide === 1){
|
||||
} else if(config.tips.guide === 1){
|
||||
win.width() - (fowo.left + fowo.width + layArea[0] + 8*2) > 0 || fowo.where[3]()
|
||||
} else if (config.tips.guide === 2){
|
||||
} else if(config.tips.guide === 2){
|
||||
(fowo.top - win.scrollTop() + fowo.height + layArea[1] + 8*2) - win.height() > 0 && fowo.where[0]();
|
||||
} else if (config.tips.guide === 3){
|
||||
} else if(config.tips.guide === 3){
|
||||
layArea[0] + 8*2 - fowo.left > 0 && fowo.where[1]()
|
||||
} else if(config.tips.guide === 4){
|
||||
|
||||
}
|
||||
layerE.css({left: fowo.tipLeft, top: fowo.tipTop});
|
||||
break;
|
||||
|
@ -431,13 +461,67 @@ Class.pt.set = function(times){
|
|||
ready.fade(layerE, config.fadeIn, 1);
|
||||
ready.fade($('#xubox_shade'+ times), config.fadeIn, config.shade[0]);
|
||||
}
|
||||
|
||||
//坐标自适应浏览器窗口尺寸
|
||||
if(config.fix && config.offset[0] === '' && !config.shift){
|
||||
win.on('resize', function(){
|
||||
layerE.css({top: (win.height() - layerE.outerHeight())/2});
|
||||
});
|
||||
}
|
||||
|
||||
that.move();
|
||||
};
|
||||
|
||||
//动画进入
|
||||
Class.pt.shift = function(type, rate, stop){
|
||||
var that = this, config = that.config;
|
||||
var layerE = that.layerE;
|
||||
var cutWth = 0, ww = win.width();
|
||||
var wh = win.height() + (config.fix ? 0 : win.scrollTop());
|
||||
|
||||
if(config.offset[1] == '50%' || config.offset[1] == ''){
|
||||
cutWth = layerE.outerWidth()/2;
|
||||
} else {
|
||||
cutWth = layerE.outerWidth();
|
||||
}
|
||||
|
||||
var anim = {
|
||||
t: {top: that.offsetTop},
|
||||
b: {top : wh - layerE.outerHeight() - config.border[0]},
|
||||
cl: cutWth + config.border[0],
|
||||
ct: -layerE.outerHeight(),
|
||||
cr: ww - cutWth - config.border[0]
|
||||
};
|
||||
|
||||
switch(type){
|
||||
case 'left-top':
|
||||
layerE.css({left: anim.cl, top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'top':
|
||||
layerE.css({top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'right-top':
|
||||
layerE.css({left: anim.cr, top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'right-bottom':
|
||||
layerE.css({left: anim.cr, top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'bottom':
|
||||
layerE.css({top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'left-bottom':
|
||||
layerE.css({left: anim.cl, top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'left':
|
||||
layerE.css({left: -layerE.outerWidth()}).animate({left: that.offsetLeft}, rate);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
//自适应宽高
|
||||
Class.pt.autoArea = function(times){
|
||||
var that = this, times = times || that.index, config = that.config, page = config.page;
|
||||
var layerE = $('#'+ doms.lay + times), layerTitle = layerE.find(doms.title), layerMian = layerE.find('.xubox_main');
|
||||
var layerE = $('#'+ doms[0] + times), layerTitle = layerE.find(doms[2]), layerMian = layerE.find(doms[5]);
|
||||
var titHeight = config.title[1] ? layerTitle.innerHeight() : 0, outHeight, btnHeight = 0;
|
||||
if(config.area[0] === 'auto' && layerMian.outerWidth() >= config.maxWidth){
|
||||
layerE.css({width : config.maxWidth});
|
||||
|
@ -445,13 +529,13 @@ Class.pt.autoArea = function(times){
|
|||
switch(config.type){
|
||||
case 0:
|
||||
var aBtn = layerE.find('.xubox_botton>a');
|
||||
outHeight = layerE.find(doms.text).outerHeight() + 20;
|
||||
outHeight = layerE.find(doms[3]).outerHeight() + 20;
|
||||
if(aBtn.length > 0){
|
||||
btnHeight = aBtn.outerHeight() + 20;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
var layerPage = layerE.find(doms.page);
|
||||
var layerPage = layerE.find(doms[4]);
|
||||
outHeight = $(page.dom).outerHeight();
|
||||
config.area[0] === 'auto' && layerE.css({width : layerPage.outerWidth()});
|
||||
if(page.html !== '' || page.url !== ''){
|
||||
|
@ -498,7 +582,7 @@ Class.pt.move = function(){
|
|||
M.preventDefault();
|
||||
if($(this).attr('move') === 'ok'){
|
||||
conf.ismove = true;
|
||||
conf.layerE = $(this).parents('.'+ doms.lay);
|
||||
conf.layerE = $(this).parents('.'+ doms[0]);
|
||||
var xx = conf.layerE.offset().left, yy = conf.layerE.offset().top, ww = conf.layerE.width() - 6, hh = conf.layerE.height() - 6;
|
||||
if(!$('#xubox_moves')[0]){
|
||||
$('body').append('<div id="xubox_moves" class="xubox_moves" style="left:'+ xx +'px; top:'+ yy +'px; width:'+ ww +'px; height:'+ hh +'px; z-index:2147483584"></div>');
|
||||
|
@ -512,7 +596,7 @@ Class.pt.move = function(){
|
|||
}
|
||||
});
|
||||
|
||||
$(document).mousemove(function(M){
|
||||
$(document).mousemove(function(M){
|
||||
if(conf.ismove){
|
||||
var offsetX = M.pageX - conf.moveX, offsetY = M.pageY - conf.moveY;
|
||||
M.preventDefault();
|
||||
|
@ -562,7 +646,7 @@ Class.pt.autoclose = function(){
|
|||
};
|
||||
|
||||
ready.config = {
|
||||
end : {}
|
||||
end: {}
|
||||
};
|
||||
|
||||
Class.pt.callback = function(){
|
||||
|
@ -615,8 +699,8 @@ Class.pt.callback = function(){
|
|||
ready.reselect = function(){
|
||||
$.each($('select'), function(index , value){
|
||||
var sthis = $(this);
|
||||
if(!sthis.parents('.'+doms.lay)[0]){
|
||||
(sthis.attr('layer') == 1 && $('.'+doms.lay).length < 1) && sthis.removeAttr('layer').show();
|
||||
if(!sthis.parents('.'+doms[0])[0]){
|
||||
(sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show();
|
||||
}
|
||||
sthis = null;
|
||||
});
|
||||
|
@ -641,7 +725,7 @@ Class.pt.IE6 = function(layerE){
|
|||
//隐藏select
|
||||
$.each($('select'), function(index , value){
|
||||
var sthis = $(this);
|
||||
if(!sthis.parents('.'+doms.lay)[0]){
|
||||
if(!sthis.parents('.'+doms[0])[0]){
|
||||
sthis.css('display') == 'none' || sthis.attr({'layer' : '1'}).hide();
|
||||
}
|
||||
sthis = null;
|
||||
|
@ -650,43 +734,16 @@ Class.pt.IE6 = function(layerE){
|
|||
|
||||
//给layer对象拓展方法
|
||||
Class.pt.openLayer = function(){
|
||||
var that = this;
|
||||
var that = this, layerE = that.layerE;
|
||||
|
||||
//自适应宽高
|
||||
layer.autoArea = function(index){
|
||||
return that.autoArea(index);
|
||||
};
|
||||
|
||||
//出场内置动画
|
||||
//兼容旧版出场动画
|
||||
layer.shift = function(type, rate, stop){
|
||||
if(layer.ie6){
|
||||
return;
|
||||
}
|
||||
var config = that.config, layerE = that.layerE, cutWth = 0, ww = win.width(), wh = win.height() + (config.fix ? 0 : win.scrollTop());
|
||||
(config.offset[1] == '50%' || config.offset[1] == '') ? cutWth = layerE.outerWidth()/2 : cutWth = layerE.outerWidth();
|
||||
var anim = {
|
||||
t: {top: that.offsetTop},
|
||||
b: {top : wh - layerE.outerHeight() - config.border[0]},
|
||||
cl: cutWth + config.border[0],
|
||||
ct: -layerE.outerHeight(),
|
||||
cr: ww - cutWth - config.border[0]
|
||||
};
|
||||
switch(type){
|
||||
case 'left-top': layerE.css({left: anim.cl, top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'top': layerE.css({top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'right-top': layerE.css({left: anim.cr, top: anim.ct}).animate(anim.t, rate);
|
||||
break;
|
||||
case 'right-bottom': layerE.css({left: anim.cr, top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'bottom': layerE.css({top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'left-bottom': layerE.css({left: anim.cl, top: wh}).animate(stop ? anim.t : anim.b, rate);
|
||||
break;
|
||||
case 'left': layerE.css({left: -layerE.outerWidth()}).animate({left: that.offsetLeft}, rate);
|
||||
break;
|
||||
}
|
||||
that.shift(type, rate, stop);
|
||||
};
|
||||
|
||||
//初始化拖拽元素
|
||||
|
@ -705,6 +762,7 @@ Class.pt.openLayer = function(){
|
|||
layerNow.on('mousedown', setZindex);
|
||||
return layer.zIndex;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
ready.isauto = function(layero, options, offset){
|
||||
|
@ -733,42 +791,42 @@ ready.rescollbar = function(index){
|
|||
|
||||
//获取page层所在索引
|
||||
layer.getIndex = function(selector){
|
||||
return $(selector).parents('.'+doms.lay).attr('times');
|
||||
return $(selector).parents('.'+doms[0]).attr('times');
|
||||
};
|
||||
|
||||
//获取子iframe的DOM
|
||||
layer.getChildFrame = function(selector, index){
|
||||
index = index || $('.'+ doms.ifr).parents('.'+doms.lay).attr('times');
|
||||
return $('#'+ doms.lay + index).find('.'+ doms.ifr).contents().find(selector);
|
||||
index = index || $('.'+ doms[1]).parents('.'+doms[0]).attr('times');
|
||||
return $('#'+ doms[0] + index).find('.'+ doms[1]).contents().find(selector);
|
||||
};
|
||||
|
||||
//得到当前iframe层的索引,子iframe时使用
|
||||
layer.getFrameIndex = function(name){
|
||||
return $(name ? '#'+ name : '.'+ doms.ifr).parents('.'+doms.lay).attr('times');
|
||||
return $(name ? '#'+ name : '.'+ doms[1]).parents('.'+doms[0]).attr('times');
|
||||
};
|
||||
|
||||
//iframe层自适应宽高
|
||||
layer.iframeAuto = function(index){
|
||||
index = index || $('.'+ doms.ifr).parents('.'+doms.lay).attr('times');
|
||||
index = index || $('.'+ doms[1]).parents('.'+doms[0]).attr('times');
|
||||
var heg = layer.getChildFrame('body', index).outerHeight(),
|
||||
layero = $('#'+ doms.lay + index), tit = layero.find(doms.title), titHt = 0;
|
||||
layero = $('#'+ doms[0] + index), tit = layero.find(doms[2]), titHt = 0;
|
||||
tit && (titHt = tit.height());
|
||||
layero.css({height: heg + titHt});
|
||||
var bs = -parseInt($('#xubox_border'+ index).css('top'));
|
||||
$('#xubox_border'+ index).css({height: heg + 2*bs + titHt});
|
||||
$('#'+ doms.ifr + index).css({height: heg});
|
||||
$('#'+ doms[1] + index).css({height: heg});
|
||||
};
|
||||
|
||||
//重置iframe url
|
||||
layer.iframeSrc = function(index, url){
|
||||
$('#'+ doms.lay + index).find('iframe').attr('src', url);
|
||||
$('#'+ doms[0] + index).find('iframe').attr('src', url);
|
||||
};
|
||||
|
||||
//重置层
|
||||
layer.area = function(index, options){
|
||||
var layero = [$('#'+ doms.lay + index), $('#xubox_border'+ index)],
|
||||
type = layero[0].attr('type'), main = layero[0].find('.xubox_main'),
|
||||
title = layero[0].find(doms.title);
|
||||
var layero = [$('#'+ doms[0] + index), $('#xubox_border'+ index)],
|
||||
type = layero[0].attr('type'), main = layero[0].find(doms[5]),
|
||||
title = layero[0].find(doms[2]);
|
||||
|
||||
if(type === ready.type[1] || type === ready.type[2]){
|
||||
layero[0].css(options);
|
||||
|
@ -793,17 +851,17 @@ layer.area = function(index, options){
|
|||
|
||||
//最小化
|
||||
layer.min = function(index, options){
|
||||
var layero = $('#'+ doms.lay + index), offset = [layero.position().top, layero.position().left + parseFloat(layero.css('margin-left'))];
|
||||
var layero = $('#'+ doms[0] + index), offset = [layero.position().top, layero.position().left + parseFloat(layero.css('margin-left'))];
|
||||
ready.isauto(layero, options, offset);
|
||||
layer.area(index, {width: 180, height: 35});
|
||||
layero.find('.xubox_min').hide();
|
||||
layero.attr('type') === 'page' && layero.find(doms.page).hide();
|
||||
layero.attr('type') === 'page' && layero.find(doms[4]).hide();
|
||||
ready.rescollbar(index);
|
||||
};
|
||||
|
||||
//还原
|
||||
layer.restore = function(index){
|
||||
var layero = $('#'+ doms.lay + index), area = layero.attr('area').split(',');
|
||||
var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
|
||||
var type = layero.attr('type');
|
||||
layer.area(index, {
|
||||
width: parseFloat(area[0]),
|
||||
|
@ -813,13 +871,13 @@ layer.restore = function(index){
|
|||
});
|
||||
layero.find('.xubox_max').removeClass('xubox_maxmin');
|
||||
layero.find('.xubox_min').show();
|
||||
layero.attr('type') === 'page' && layero.find(doms.page).show();
|
||||
layero.attr('type') === 'page' && layero.find(doms[4]).show();
|
||||
ready.rescollbar(index);
|
||||
};
|
||||
|
||||
//全屏
|
||||
layer.full = function(index, options){
|
||||
var layero = $('#'+ doms.lay + index), borders = options.border[0]*2, timer;
|
||||
var layero = $('#'+ doms[0] + index), borders = options.border[0]*2 || 6, timer;
|
||||
var offset = [layero.position().top, layero.position().left + parseFloat(layero.css('margin-left'))];
|
||||
ready.isauto(layero, options, offset);
|
||||
if(!doms.html.attr('layer-full')){
|
||||
|
@ -836,9 +894,15 @@ layer.full = function(index, options){
|
|||
}, 100);
|
||||
};
|
||||
|
||||
//改变title
|
||||
layer.title = function(name, index){
|
||||
var title = $('#'+ doms[0] + (index||layer.index)).find('.xubox_title>em');
|
||||
title.html(name);
|
||||
};
|
||||
|
||||
//关闭layer总方法
|
||||
layer.close = function(index){
|
||||
var layero = $('#'+ doms.lay + index), type = layero.attr('type'), shadeNow = $('#xubox_moves, #xubox_shade' + index);
|
||||
var layero = $('#'+ doms[0] + index), type = layero.attr('type'), shadeNow = $('#xubox_moves, #xubox_shade' + index);
|
||||
if(!layero[0]){
|
||||
return;
|
||||
}
|
||||
|
@ -865,22 +929,26 @@ layer.close = function(index){
|
|||
|
||||
//关闭loading层
|
||||
layer.closeLoad = function(){
|
||||
layer.close($('.xubox_loading').parents('.'+doms.lay).attr('times'));
|
||||
layer.close($('.xubox_loading').parents('.'+doms[0]).attr('times'));
|
||||
};
|
||||
|
||||
//关闭tips层
|
||||
layer.closeTips = function(){
|
||||
layer.close($('.xubox_tips').parents('.'+doms.lay).attr('times'));
|
||||
layer.closeAll('tips');
|
||||
};
|
||||
|
||||
//关闭所有层
|
||||
layer.closeAll = function(){
|
||||
$.each($('.'+doms.lay), function(){
|
||||
layer.close($(this).attr('times'));
|
||||
layer.closeAll = function(type){
|
||||
$.each($('.'+doms[0]), function(){
|
||||
var othis = $(this);
|
||||
var is = type ? (othis.attr('type') === type) : 1;
|
||||
if(is){
|
||||
layer.close(othis.attr('times'));
|
||||
}
|
||||
is = null;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//主入口
|
||||
ready.run = function(){
|
||||
$ = jQuery;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -70,7 +70,7 @@
|
|||
.xubox_botton2:hover{ background-position:-5px -146px;}
|
||||
.xubox_botton .xubox_botton3{width:71px; height:29px; line-height:29px; margin-left:10px; background-position:-81px -114px;}
|
||||
.xubox_botton3:hover{background-position:-81px -146px;}
|
||||
.xubox_tips{position:relative; line-height:20px; padding:3px 30px 3px 10px; font-size:12px; _float:left; border-radius:3px; box-shadow: 1px 1px 3px rgba(0,0,0,.3);}
|
||||
.xubox_tips{position:relative; line-height:20px; min-width: 12px; padding:3px 30px 3px 10px; font-size:12px; _float:left; border-radius:3px; box-shadow: 1px 1px 3px rgba(0,0,0,.3);}
|
||||
.xubox_tips i.layerTipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
|
||||
.xubox_tips i.layerTipsT, .xubox_tips i.layerTipsB{left:5px; border-right-style:solid;}
|
||||
.xubox_tips i.layerTipsT{bottom:-8px;}
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
.xubox_layer .xubox_formArea{width:300px; height:100px; line-height:20px;}
|
||||
|
||||
/* tab模式 */
|
||||
.xubox_layer .xubox_tab{position:relative; border:1px solid #ccc;}
|
||||
.xubox_layer .xubox_tab{position:relative; background-color:#fff; box-shadow:1px 1px 50px rgba(0,0,0,.4)}
|
||||
.xubox_layer .xubox_tabmove{position:absolute; width:600px; height:30px; top:0; left:0;}
|
||||
.xubox_layer .xubox_tabtit{ display:block; height:30px; border-bottom:1px solid #ccc; background-color:#eee;}
|
||||
.xubox_layer .xubox_tabtit span{position:relative; float:left; width:120px; height:30px; line-height:30px; text-align:center; cursor:default;}
|
||||
.xubox_layer .xubox_tabtit span.xubox_tabnow{left:-1px; _top:1px; height:31px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}
|
||||
.xubox_layer .xubox_tabtit{ display:block; height:34px; border-bottom:1px solid #ccc; background-color:#eee;}
|
||||
.xubox_layer .xubox_tabtit span{position:relative; float:left; width:120px; height:34px; line-height:34px; text-align:center; cursor:default;}
|
||||
.xubox_layer .xubox_tabtit span.xubox_tabnow{left:-1px; _top:1px; height:35px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}
|
||||
.xubox_layer .xubox_tab_main{line-height:24px; clear:both;}
|
||||
.xubox_layer .xubox_tab_main .xubox_tabli{display:none;}
|
||||
.xubox_layer .xubox_tab_main .xubox_tabli.xubox_tab_layer{display:block;}
|
||||
|
|
Loading…
Reference in New Issue