upgrade layer.js
This commit is contained in:
@@ -1,29 +1,77 @@
|
|||||||
/**
|
/**
|
||||||
@Name:layer v3.0.3 Web弹层组件
|
@Name:layer v3.1.1 Web弹层组件
|
||||||
@Author:贤心
|
@Author:贤心
|
||||||
@Site:http://layer.layui.com
|
@Site:http://layer.layui.com
|
||||||
@License:MIT
|
@License:MIT
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;!function(window, undefined){
|
;!function(window, undefined){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isLayui = window.layui && layui.define, $, win, ready = {
|
var isLayui = window.layui && layui.define, $, win, ready = {
|
||||||
getPath: function(){
|
getPath: function(){
|
||||||
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
|
var jsPath = document.currentScript ? document.currentScript.src : function(){
|
||||||
if(script.getAttribute('merge')) return;
|
var js = document.scripts
|
||||||
return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
|
,last = js.length - 1
|
||||||
|
,src;
|
||||||
|
for(var i = last; i > 0; i--){
|
||||||
|
if(js[i].readyState === 'interactive'){
|
||||||
|
src = js[i].src;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return src || js[last].src;
|
||||||
|
}();
|
||||||
|
return jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
|
||||||
}(),
|
}(),
|
||||||
|
|
||||||
config: {}, end: {}, minIndex: 0, minLeft: [],
|
config: {}, end: {}, minIndex: 0, minLeft: [],
|
||||||
//btn: [layer.i18n.btnOk, layer.i18n.btnCancel], // ThinkGem
|
//btn: [layer.i18n.btnOk, layer.i18n.btnCancel], // ThinkGem
|
||||||
|
|
||||||
//五种原始层模式
|
//五种原始层模式
|
||||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips']
|
type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
|
||||||
|
|
||||||
|
//获取节点的style属性值
|
||||||
|
getStyle: function(node, name){
|
||||||
|
var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);
|
||||||
|
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
||||||
|
},
|
||||||
|
|
||||||
|
//载入CSS配件
|
||||||
|
link: function(href, fn, cssname){
|
||||||
|
|
||||||
|
//未设置路径,则不主动加载css
|
||||||
|
if(!layer.path) return;
|
||||||
|
|
||||||
|
var head = document.getElementsByTagName("head")[0], link = document.createElement('link');
|
||||||
|
if(typeof fn === 'string') cssname = fn;
|
||||||
|
var app = (cssname || href).replace(/\.|\//g, '');
|
||||||
|
var id = 'layuicss-'+ app, timeout = 0;
|
||||||
|
|
||||||
|
link.rel = 'stylesheet';
|
||||||
|
link.href = layer.path + href;
|
||||||
|
link.id = id;
|
||||||
|
|
||||||
|
if(!document.getElementById(id)){
|
||||||
|
head.appendChild(link);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof fn !== 'function') return;
|
||||||
|
|
||||||
|
//轮询css是否加载完毕
|
||||||
|
(function poll() {
|
||||||
|
if(++timeout > 8 * 1000 / 100){
|
||||||
|
return window.console && console.error('layer.css: Invalid');
|
||||||
|
};
|
||||||
|
parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100);
|
||||||
|
}());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//默认内置方法。
|
//默认内置方法。
|
||||||
var layer = {
|
var layer = {
|
||||||
v: '3.0.3',
|
v: '3.1.1',
|
||||||
i18n: { // ThinkGem 国际化支持
|
i18n: { // ThinkGem 国际化支持
|
||||||
btnOk: '确定',
|
btnOk: '确定',
|
||||||
btnCancel: '取消',
|
btnCancel: '取消',
|
||||||
@@ -55,45 +103,16 @@ var layer = {
|
|||||||
|
|
||||||
isLayui
|
isLayui
|
||||||
? layui.addcss('modules/layer/' + options.extend)
|
? layui.addcss('modules/layer/' + options.extend)
|
||||||
: layer.link('skin/' + options.extend);
|
: ready.link('skin/' + options.extend);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
//载入CSS配件
|
//主体CSS等待事件
|
||||||
link: function(href, fn, cssname){
|
|
||||||
|
|
||||||
//未设置路径,则不主动加载css
|
|
||||||
if(!layer.path) return;
|
|
||||||
|
|
||||||
var head = $('head')[0], link = document.createElement('link');
|
|
||||||
if(typeof fn === 'string') cssname = fn;
|
|
||||||
var app = (cssname || href).replace(/\.|\//g, '');
|
|
||||||
var id = 'layuicss-'+app, timeout = 0;
|
|
||||||
|
|
||||||
link.rel = 'stylesheet';
|
|
||||||
link.href = layer.path + href;
|
|
||||||
link.id = id;
|
|
||||||
|
|
||||||
if(!$('#'+ id)[0]){
|
|
||||||
head.appendChild(link);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(typeof fn !== 'function') return;
|
|
||||||
|
|
||||||
//轮询css是否加载完毕
|
|
||||||
(function poll() {
|
|
||||||
if(++timeout > 8 * 1000 / 100){
|
|
||||||
return window.console && console.error('layer.css: Invalid');
|
|
||||||
};
|
|
||||||
parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
|
|
||||||
}());
|
|
||||||
},
|
|
||||||
|
|
||||||
ready: function(callback){
|
ready: function(callback){
|
||||||
var cssname = 'skinlayercss', ver = '303';
|
var cssname = 'layer', ver = ''
|
||||||
isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
|
,path = (isLayui ? 'modules/layer/' : 'skin/') + 'default/layer.css?v='+ layer.v + ver;
|
||||||
: layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);
|
isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -185,7 +204,7 @@ Class.pt = Class.prototype;
|
|||||||
|
|
||||||
//缓存常用字符
|
//缓存常用字符
|
||||||
var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
|
var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
|
||||||
doms.anim = ['layer-anim', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
|
doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
|
||||||
|
|
||||||
//默认配置
|
//默认配置
|
||||||
Class.pt.config = {
|
Class.pt.config = {
|
||||||
@@ -221,7 +240,7 @@ Class.pt.vessel = function(conType, callback){
|
|||||||
config.zIndex = zIndex;
|
config.zIndex = zIndex;
|
||||||
callback([
|
callback([
|
||||||
//遮罩
|
//遮罩
|
||||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
|
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; ') +'"></div>') : '',
|
||||||
|
|
||||||
//主体
|
//主体
|
||||||
'<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
|
'<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
|
||||||
@@ -291,7 +310,7 @@ Class.pt.creat = function(){
|
|||||||
+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times
|
+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times
|
||||||
+ '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0"></iframe><form id="'
|
+ '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0"></iframe><form id="'
|
||||||
+ doms[4] + '-form' + times+'" action="' + config.content[0] + '" method="post" target="'
|
+ doms[4] + '-form' + times+'" action="' + config.content[0] + '" method="post" target="'
|
||||||
+ doms[4] + '' + times +'">';
|
+ doms[4] + '' + times +'"></form>';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
delete config.title;
|
delete config.title;
|
||||||
@@ -326,6 +345,12 @@ Class.pt.creat = function(){
|
|||||||
that.layero = $('#'+ doms[0] + times);
|
that.layero = $('#'+ doms[0] + times);
|
||||||
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
||||||
}).auto(times);
|
}).auto(times);
|
||||||
|
|
||||||
|
//遮罩
|
||||||
|
$('#layui-layer-shade'+ that.index).css({
|
||||||
|
'background-color': config.shade[1] || '#000'
|
||||||
|
,'opacity': config.shade[0]||config.shade
|
||||||
|
});
|
||||||
|
|
||||||
//config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]); // ThinkGem 不需要ie6
|
//config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]); // ThinkGem 不需要ie6
|
||||||
|
|
||||||
@@ -337,7 +362,6 @@ Class.pt.creat = function(){
|
|||||||
}
|
}
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//坐标自适应浏览器窗口尺寸
|
//坐标自适应浏览器窗口尺寸
|
||||||
config.type == 4 ? that.tips() : that.offset();
|
config.type == 4 ? that.tips() : that.offset();
|
||||||
if(config.fixed){
|
if(config.fixed){
|
||||||
@@ -355,7 +379,10 @@ Class.pt.creat = function(){
|
|||||||
|
|
||||||
//为兼容jQuery3.0的css动画影响元素尺寸计算
|
//为兼容jQuery3.0的css动画影响元素尺寸计算
|
||||||
if(doms.anim[config.anim]){
|
if(doms.anim[config.anim]){
|
||||||
that.layero.addClass(doms.anim[config.anim]);
|
var animClass = 'layer-anim '+ doms.anim[config.anim];
|
||||||
|
that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
|
||||||
|
$(this).removeClass(animClass);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//记录关闭动画
|
//记录关闭动画
|
||||||
@@ -367,6 +394,7 @@ Class.pt.creat = function(){
|
|||||||
//自适应
|
//自适应
|
||||||
Class.pt.auto = function(index){
|
Class.pt.auto = function(index){
|
||||||
var that = this, config = that.config, layero = $('#'+ doms[0] + index);
|
var that = this, config = that.config, layero = $('#'+ doms[0] + index);
|
||||||
|
|
||||||
if(config.area[0] === '' && config.maxWidth > 0){
|
if(config.area[0] === '' && config.maxWidth > 0){
|
||||||
//为了修复IE7下一个让人难以理解的bug
|
//为了修复IE7下一个让人难以理解的bug
|
||||||
if(layer.ie && layer.ie < 8 && config.btn){
|
if(layer.ie && layer.ie < 8 && config.btn){
|
||||||
@@ -374,20 +402,25 @@ Class.pt.auto = function(index){
|
|||||||
}
|
}
|
||||||
layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
|
layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
|
||||||
}
|
}
|
||||||
var area = [layero.innerWidth(), layero.innerHeight()];
|
|
||||||
var titHeight = layero.find(doms[1]).outerHeight() || 0;
|
var area = [layero.innerWidth(), layero.innerHeight()]
|
||||||
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
|
,titHeight = layero.find(doms[1]).outerHeight() || 0
|
||||||
function setHeight(elem){
|
,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
|
||||||
|
,setHeight = function(elem){
|
||||||
elem = layero.find(elem);
|
elem = layero.find(elem);
|
||||||
elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
|
elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
|
||||||
}
|
};
|
||||||
|
|
||||||
switch(config.type){
|
switch(config.type){
|
||||||
case 2:
|
case 2:
|
||||||
setHeight('iframe');
|
setHeight('iframe');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(config.area[1] === ''){
|
if(config.area[1] === ''){
|
||||||
if(config.fixed && area[1] >= win.height()){
|
if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){
|
||||||
|
area[1] = config.maxHeight;
|
||||||
|
setHeight('.'+doms[5]);
|
||||||
|
} else if(config.fixed && area[1] >= win.height()){
|
||||||
area[1] = win.height();
|
area[1] = win.height();
|
||||||
setHeight('.'+doms[5]);
|
setHeight('.'+doms[5]);
|
||||||
}
|
}
|
||||||
@@ -395,7 +428,8 @@ Class.pt.auto = function(index){
|
|||||||
setHeight('.'+doms[5]);
|
setHeight('.'+doms[5]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -454,7 +488,7 @@ Class.pt.offset = function(){
|
|||||||
that.offsetLeft = layero.css('left');
|
that.offsetLeft = layero.css('left');
|
||||||
}
|
}
|
||||||
|
|
||||||
that.offsetTop = that.offsetTop>0?that.offsetTop:0; // 2017-5-8 ThinkGem Top值不小于0
|
that.offsetTop = that.offsetTop > 0 ? that.offsetTop : 0; // 2017-5-8 ThinkGem Top值不小于0
|
||||||
|
|
||||||
layero.css({top: that.offsetTop, left: that.offsetLeft});
|
layero.css({top: that.offsetTop, left: that.offsetLeft});
|
||||||
};
|
};
|
||||||
@@ -944,7 +978,7 @@ layer.close = function(index){
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(layero.data('isOutAnim')){
|
if(layero.data('isOutAnim')){
|
||||||
layero.addClass(closeAnim);
|
layero.addClass('layer-anim '+ closeAnim);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
|
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
|
||||||
@@ -975,9 +1009,7 @@ layer.closeAll = function(type){
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
拓展模块,layui开始合并在一起
|
拓展模块,layui开始合并在一起
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var cache = layer.cache||{}, skin = function(type){
|
var cache = layer.cache||{}, skin = function(type){
|
||||||
@@ -1033,6 +1065,7 @@ layer.tab = function(options){
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
var tab = options.tab || {}
|
var tab = options.tab || {}
|
||||||
|
,THIS = 'layui-this'
|
||||||
,success = options.success;
|
,success = options.success;
|
||||||
|
|
||||||
delete options.success;
|
delete options.success;
|
||||||
@@ -1044,7 +1077,7 @@ layer.tab = function(options){
|
|||||||
title: function(){
|
title: function(){
|
||||||
var len = tab.length, ii = 1, str = '';
|
var len = tab.length, ii = 1, str = '';
|
||||||
if(len > 0){
|
if(len > 0){
|
||||||
str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
|
str = '<span class="'+ THIS +'">'+ tab[0].title +'</span>';
|
||||||
for(; ii < len; ii++){
|
for(; ii < len; ii++){
|
||||||
str += '<span>'+ tab[ii].title +'</span>';
|
str += '<span>'+ tab[ii].title +'</span>';
|
||||||
}
|
}
|
||||||
@@ -1054,7 +1087,7 @@ layer.tab = function(options){
|
|||||||
content: '<ul class="layui-layer-tabmain">'+ function(){
|
content: '<ul class="layui-layer-tabmain">'+ function(){
|
||||||
var len = tab.length, ii = 1, str = '';
|
var len = tab.length, ii = 1, str = '';
|
||||||
if(len > 0){
|
if(len > 0){
|
||||||
str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
|
str = '<li class="layui-layer-tabli '+ THIS +'">'+ (tab[0].content || 'no content') +'</li>';
|
||||||
for(; ii < len; ii++){
|
for(; ii < len; ii++){
|
||||||
str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
|
str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
|
||||||
}
|
}
|
||||||
@@ -1067,7 +1100,7 @@ layer.tab = function(options){
|
|||||||
btn.on('mousedown', function(e){
|
btn.on('mousedown', function(e){
|
||||||
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
|
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
|
||||||
var othis = $(this), index = othis.index();
|
var othis = $(this), index = othis.index();
|
||||||
othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
|
othis.addClass(THIS).siblings().removeClass(THIS);
|
||||||
main.eq(index).show().siblings().hide();
|
main.eq(index).show().siblings().hide();
|
||||||
typeof options.change === 'function' && options.change(index);
|
typeof options.change === 'function' && options.change(index);
|
||||||
});
|
});
|
||||||
@@ -1127,7 +1160,7 @@ layer.photos = function(options, loop, key){
|
|||||||
if(!loop) return;
|
if(!loop) return;
|
||||||
|
|
||||||
} else if (data.length === 0){
|
} else if (data.length === 0){
|
||||||
return layer.msg(message.noPicture);
|
return layer.msg(layer.i18n.noPicture);
|
||||||
}
|
}
|
||||||
|
|
||||||
//上一张
|
//上一张
|
||||||
@@ -1298,7 +1331,7 @@ window.layui && layui.define ? (
|
|||||||
layer.ready()
|
layer.ready()
|
||||||
,layui.define('jquery', function(exports){ //layui加载
|
,layui.define('jquery', function(exports){ //layui加载
|
||||||
layer.path = layui.cache.dir;
|
layer.path = layui.cache.dir;
|
||||||
ready.run(layui.jquery);
|
ready.run(layui.$);
|
||||||
|
|
||||||
//暴露模块
|
//暴露模块
|
||||||
window.layer = layer;
|
window.layer = layer;
|
||||||
@@ -1314,4 +1347,4 @@ window.layui && layui.define ? (
|
|||||||
}()
|
}()
|
||||||
);
|
);
|
||||||
|
|
||||||
}(window);
|
}(window);
|
||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
*html{background-image: url(about:blank); background-attachment: fixed;}
|
/* *html{background-image: url(about:blank); background-attachment: fixed;} */
|
||||||
html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}
|
.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}
|
||||||
.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}
|
.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}
|
||||||
.layui-layer{-webkit-overflow-scrolling: touch;}
|
.layui-layer{-webkit-overflow-scrolling: touch;}
|
||||||
.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
|
.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; border-radius: 2px; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
|
||||||
.layui-layer-close{position:absolute;}
|
.layui-layer-close{position:absolute;}
|
||||||
.layui-layer-content{position:relative;}
|
.layui-layer-content{position:relative;}
|
||||||
.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
|
.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
|
||||||
@@ -26,7 +26,7 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;}
|
.layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;}
|
||||||
|
|
||||||
/* 动画 */
|
/* 动画 */
|
||||||
.layui-layer{border-radius: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}
|
.layer-anim{-webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}
|
||||||
|
|
||||||
@-webkit-keyframes layer-bounceIn { /* 默认 */
|
@-webkit-keyframes layer-bounceIn { /* 默认 */
|
||||||
0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
|
0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
|
||||||
@@ -36,7 +36,7 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
|
0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
|
||||||
100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
|
100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
|
||||||
}
|
}
|
||||||
.layer-anim{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}
|
.layer-anim-00{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}
|
||||||
|
|
||||||
@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}
|
@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}
|
||||||
|
|
||||||
@@ -66,18 +66,18 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}
|
.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}
|
||||||
|
|
||||||
/* 按钮栏 */
|
/* 按钮栏 */
|
||||||
.layui-layer-btn{text-align: right; padding:0 10px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;}
|
.layui-layer-btn{text-align: right; padding: 0 15px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;}
|
||||||
.layui-layer-btn a{height: 28px; line-height: 28px; margin: 6px 3px 0; padding: 0 15px; border:1px #dedede solid; background-color:#f1f1f1; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;}
|
.layui-layer-btn a{height: 28px; line-height: 28px; margin: 5px 5px 0; padding: 0 15px; border: 1px solid #dedede; background-color:#fff; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;}
|
||||||
.layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;}
|
.layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;}
|
||||||
.layui-layer-btn a:active{opacity: 0.8;}
|
.layui-layer-btn a:active{opacity: 0.8;}
|
||||||
.layui-layer-btn .layui-layer-btn0{border-color: #4898d5; background-color: #2e8ded; color:#fff;}
|
.layui-layer-btn .layui-layer-btn0{border-color: #1E9FFF; background-color: #1E9FFF; color:#fff;}
|
||||||
.layui-layer-btn-l{text-align: left;}
|
.layui-layer-btn-l{text-align: left;}
|
||||||
.layui-layer-btn-c{text-align: center;}
|
.layui-layer-btn-c{text-align: center;}
|
||||||
|
|
||||||
/* 定制化 */
|
/* 定制化 */
|
||||||
.layui-layer-dialog{min-width:260px;}
|
.layui-layer-dialog{min-width:260px;}
|
||||||
.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
|
.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
|
||||||
.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:7px; left:10px; _left:-40px; width:30px; height:30px;}
|
.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}
|
||||||
.layui-layer-ico1{background-position:-30px 0 }
|
.layui-layer-ico1{background-position:-30px 0 }
|
||||||
.layui-layer-ico2{background-position:-60px 0;}
|
.layui-layer-ico2{background-position:-60px 0;}
|
||||||
.layui-layer-ico3{background-position:-90px 0;}
|
.layui-layer-ico3{background-position:-90px 0;}
|
||||||
@@ -88,7 +88,7 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-msg{min-width:180px; border:1px solid #D3D4D3; box-shadow: none;}
|
.layui-layer-msg{min-width:180px; border:1px solid #D3D4D3; box-shadow: none;}
|
||||||
.layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;}
|
.layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;}
|
||||||
.layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;}
|
.layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;}
|
||||||
.layui-layer-dialog .layui-layer-padding{padding: 10px 20px 10px 55px; text-align: left;}
|
.layui-layer-dialog .layui-layer-padding{padding: 20px 20px 20px 55px; text-align: left;}
|
||||||
.layui-layer-page .layui-layer-content{position:relative; overflow:auto;}
|
.layui-layer-page .layui-layer-content{position:relative; overflow:auto;}
|
||||||
.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
|
.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
|
||||||
.layui-layer-nobg{background:none;}
|
.layui-layer-nobg{background:none;}
|
||||||
@@ -99,13 +99,13 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url(loading-1.gif) no-repeat;}
|
.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url(loading-1.gif) no-repeat;}
|
||||||
.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url(loading-2.gif) no-repeat;}
|
.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url(loading-2.gif) no-repeat;}
|
||||||
.layui-layer-tips{background: none; box-shadow:none; border:none;}
|
.layui-layer-tips{background: none; box-shadow:none; border:none;}
|
||||||
.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 5px 10px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
|
.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 8px 15px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
|
||||||
.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}
|
.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}
|
||||||
.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
|
.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
|
||||||
.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}
|
.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}
|
||||||
.layui-layer-tips i.layui-layer-TipsT{bottom:-8px;}
|
.layui-layer-tips i.layui-layer-TipsT{bottom:-8px;}
|
||||||
.layui-layer-tips i.layui-layer-TipsB{top:-8px;}
|
.layui-layer-tips i.layui-layer-TipsB{top:-8px;}
|
||||||
.layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top:1px; border-bottom-style:solid; border-bottom-color: #000;}
|
.layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top: 5px; border-bottom-style:solid; border-bottom-color: #000;}
|
||||||
.layui-layer-tips i.layui-layer-TipsR{left:-8px;}
|
.layui-layer-tips i.layui-layer-TipsR{left:-8px;}
|
||||||
.layui-layer-tips i.layui-layer-TipsL{right:-8px;}
|
.layui-layer-tips i.layui-layer-TipsL{right:-8px;}
|
||||||
|
|
||||||
@@ -113,14 +113,13 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-lan[type="dialog"]{min-width:280px;}
|
.layui-layer-lan[type="dialog"]{min-width:280px;}
|
||||||
.layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;}
|
.layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;}
|
||||||
.layui-layer-lan .layui-layer-btn{padding: 5px 10px 10px; text-align: right; border-top:1px solid #E9E7E7}
|
.layui-layer-lan .layui-layer-btn{padding: 5px 10px 10px; text-align: right; border-top:1px solid #E9E7E7}
|
||||||
.layui-layer-lan .layui-layer-btn a{background:#BBB5B5; border:none;}
|
.layui-layer-lan .layui-layer-btn a{background: #fff; border-color: #E9E7E7; color: #333;}
|
||||||
.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;}
|
.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;}
|
||||||
.layui-layer-molv .layui-layer-title{background:#009f95; color:#fff; border: none;}
|
.layui-layer-molv .layui-layer-title{background: #009f95; color:#fff; border: none;}
|
||||||
.layui-layer-molv .layui-layer-btn a{background:#009f95;}
|
.layui-layer-molv .layui-layer-btn a{background: #009f95; border-color: #009f95;}
|
||||||
.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;}
|
.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@Name: layer拓展样式
|
@Name: layer拓展样式
|
||||||
@@ -130,21 +129,20 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-iconext{background:url(icon-ext.png) no-repeat;}
|
.layui-layer-iconext{background:url(icon-ext.png) no-repeat;}
|
||||||
|
|
||||||
/* prompt模式 */
|
/* prompt模式 */
|
||||||
.layui-layer-prompt .layui-layer-input{display:block; width:220px; height:30px; margin:0 auto; line-height:30px; padding: 0 5px; border: 1px solid #ccc; box-shadow: 1px 1px 5px rgba(0,0,0,.1) inset; color:#333;}
|
.layui-layer-prompt .layui-layer-input{display: block; width: 230px; height: 36px; margin: 0 auto; line-height: 30px; padding-left: 10px; border: 1px solid #e6e6e6; color: #333;}
|
||||||
.layui-layer-prompt textarea.layui-layer-input{width:300px; height:100px; line-height:20px;}
|
.layui-layer-prompt textarea.layui-layer-input{width: 300px; height: 100px; line-height: 20px; padding: 6px 10px;}
|
||||||
.layui-layer-prompt .layui-layer-content{padding: 20px;}
|
.layui-layer-prompt .layui-layer-content{padding: 20px;}
|
||||||
.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
|
.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
|
||||||
|
|
||||||
/* tab模式 */
|
/* tab模式 */
|
||||||
.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
|
.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
|
||||||
.layui-layer-tab .layui-layer-title{padding-left:0; border-bottom:1px solid #ccc; background-color:#eee; overflow: visible;}
|
.layui-layer-tab .layui-layer-title{padding-left:0; overflow: visible;}
|
||||||
.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; cursor: pointer;}
|
||||||
.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}
|
.layui-layer-tab .layui-layer-title span.layui-this{height: 43px; border-left: 1px solid #eee; border-right: 1px solid #eee; background-color: #fff; z-index: 10;}
|
||||||
.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
|
.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
|
||||||
.layui-layer-tabmain{line-height:24px; clear:both;}
|
.layui-layer-tabmain{line-height:24px; clear:both;}
|
||||||
.layui-layer-tabmain .layui-layer-tabli{display:none;}
|
.layui-layer-tabmain .layui-layer-tabli{display:none;}
|
||||||
.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block;}
|
.layui-layer-tabmain .layui-layer-tabli.layui-this{display: block;}
|
||||||
.xubox_tabclose{position:absolute; right:10px; top:5px; cursor:pointer;}
|
|
||||||
|
|
||||||
/* photo模式 */
|
/* photo模式 */
|
||||||
.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}
|
.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}
|
||||||
@@ -174,7 +172,7 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
|
30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
|
||||||
0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
|
0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
|
||||||
}
|
}
|
||||||
.layer-anim-close{-webkit-animation-name: layer-bounceOut;animation-name: layer-bounceOut; -webkit-animation-duration:.2s; animation-duration:.2s;}
|
.layer-anim-close{-webkit-animation-name: layer-bounceOut; animation-name: layer-bounceOut; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.2s; animation-duration:.2s;}
|
||||||
|
|
||||||
@media screen and (max-width: 1100px) {
|
@media screen and (max-width: 1100px) {
|
||||||
.layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;}
|
.layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;}
|
||||||
@@ -186,5 +184,5 @@ html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-page .layui-layer-content .form-file{padding-top:4px;}
|
.layui-layer-page .layui-layer-content .form-file{padding-top:4px;}
|
||||||
.layui-layer-page .layui-layer-btn, .layui-layer-iframe .layui-layer-btn {
|
.layui-layer-page .layui-layer-btn, .layui-layer-iframe .layui-layer-btn {
|
||||||
padding-top:3px;padding-bottom:10px;}
|
padding-top:3px;padding-bottom:10px;}
|
||||||
.layui-layer-btn .layui-layer-btn0{border-color:#367fa9;background-color: #367fa9;}
|
.layui-layer-btn .layui-layer-btn0{border-color:#367fa9;background-color:#367fa9;}
|
||||||
.layui-layer-btn a {height:auto;padding:0 12px;font-size:13px;}
|
.layui-layer-btn a {height:auto;padding:0 12px;font-size:13px;background-color:#f4f4f4;}
|
||||||
|
|||||||
Reference in New Issue
Block a user