方法一:全局修改应用样式(css中修改)
//全局修改 在css增加样式
//如果有四个按钮
//class:.layui-layer-btn .layui-layer-btn0
//.layui-layer-btn .layui-layer-btn1
//以此类推 或者去网页查看class名字
.layui-layer-btn .layui-layer-btn0{
//css样式 现在网页中调节好再copy过来
....
}
.layui-layer-btn .layui-layer-btn1{
}
方法二:局部修改应用样式(每次渲染css样式)
//JS部分//渲染方法function addIconforBtn() {
debuggervar btn1= $(".layui-layer-btn .layui-layer-btn0");var btn2 = $(".layui-layer-btn .layui-layer-btn1");var btn3= $(".layui-layer-btn .layui-layer-btn2");var btn4 = $(".layui-layer-btn .layui-layer-btn3");btn1.css({
//css样式})btn1.css({
//css样式//"属性名":"属性值","background-color":"#009688", })btn2.css({
//css样式})btn3.css({
//css样式})}
//HTML部分var index = layer.open({
type: 2,title: "弹出层标题",content: 'AlarmSafetyInfo.html',area: ['1100px', '600px'],maxmin: true,shade: 0,btn: ['btn0','btn1','btn2','关闭'],yes: function(index, layero){
//按钮【按钮一】的回调},btn2: function(index, layero){
//按钮【按钮二】的回调},btn3: function(index, layero){
//按钮【按钮三】的回调},btn4: function(index, layero){
//按钮【按钮四】的回调},success: function(layero, index){
debugger//渲染按钮的样式addIconforBtn();}
})