//eg1
layer.msg('只想弱弱提示');
//eg2
layer.msg('有表情地提示', {icon: 6});
//eg3
layer.msg('关闭后想做些什么', function(){
//do something
});
//eg
layer.msg('同上', {
icon: 1,
time: 2000 //2秒关闭(如果不配置,默认是3秒)
}, function(){
//do something
});
转载:https://blog.csdn.net/tao111369/article/details/84134071
设置背景颜色:
layer.msg('黑色透明'); //默认的两种背景
layer.msg('白色背景', {icon: 5})
//自定义的背景颜色
layer.msg('自定义背景',{icon:5, skin:'demo'});
body .demo .layui-layer-content{background-color: #c00; color: #fff;}