//文本里面可以加html标签
let sure = layer.msg('<span style="font-size:20px">确定喜欢她吗?</span>', {
        time: 0 //0表示不自动关闭 ,time自动关闭所需毫秒 ,单位是毫秒(1秒=1000毫秒)
        , btn: ['<span style="font-size:20px">确定</span>', '<span style="font-size:20px">取消</span>'],
           //success指的是 修改按钮的样式 三种样式left center right
           success: function(layero){
               layero.find('.layui-layer-btn').css('text-align', 'center')
           }
        , yes: function (index) {
            点击确定触发事件
        }
    });
//sure指的是上面的msg弹出层,定义msg弹出层的样式
layer.style(sure,{
    width:10px,
    height:10px
});


转自:https://www.jianshu.com/p/de92f0f44bef

相关文章:

  • 2021-05-10
  • 2021-12-22
  • 2022-12-23
  • 2021-12-27
  • 2021-04-09
  • 2021-04-16
  • 2021-06-24
  • 2021-04-18
猜你喜欢
  • 2022-12-23
  • 2022-03-09
  • 2022-12-23
  • 2021-12-26
  • 2022-02-01
  • 2021-07-23
  • 2021-07-05
相关资源
相似解决方案