css代码

body .demo-class .layui-layer-title{background:#c00; color:#fff; border: none;}
body .demo-class .layui-layer-btn{border-top:1px solid #E9E7E7}
body .demo-class .layui-layer-btn a{background:#333;}
body .demo-class .layui-layer-btn .layui-layer-btn1{background:#999;}

html代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>自定义layer样式</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/layui/css/skin.css">
    <script src="/layui/layui.js"></script>

</head>
<body class="main_body">
<button class="layui-btn">点击转换</button>
<script>
    layui.use(['layer', 'jquery'], function () {
        var layer = layui.layer,
            $ = layui.jquery;
        $('.layui-btn').on('click', function () {
            layer.open({
                skin: 'demo-class',
                content:'这是弹出的自定义样式'
            });
            layer.config({
                skin: 'demo-class'
            })
        })
    })
</script>
</body>
</html>