Home  >  Article  >  Web Front-end  >  layui open changes button color

layui open changes button color

尚
forward
2020-06-10 17:38:325926browse

layui open changes button color

1. Create a new folder and css file under layer:

layui open changes button color

css content:

body .layui-ext-yourskin .layui-layer-btn0{    
  border-color: #55ff83;    
  background-color: #5aff53;    
  color: #4736ff;
}

HTML content:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<body>
<button id="button" >一个标准的按钮</button>
<script src="layui/layui.js"></script>
<script>
    layui.use([&#39;form&#39;,&#39;layer&#39;,&#39;jquery&#39;], function(){
        var form = layui.form;
        var layer=layui.layer;
        var $=layui.jquery;
            layer.config({
            extend: &#39;zidiny/123.css&#39; //同样需要加载新皮肤
        });
        $("#button").click(function () {
            layer.open({
                title: &#39;在线调试&#39;
                ,skin: &#39;layui-ext-yourskin&#39; //只对该层采用myskin皮肤
             ,content: &#39;可以填写任意的layer代码&#39;
            });
        })
    });
</script>
</body>
</html>

The effect is as follows:

layui open changes button color

##For more

layui knowledge, please pay attention to PHP Chinese Netlayui tutorial column

The above is the detailed content of layui open changes button color. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete