这是你需要做的页面:
在这里插入图片描述
这是你做的页面
在这里插入图片描述

发现按钮颜色是框架中没有的
于是我们自己写个色
1. 利用ps找颜色
(我找好啦 为了后面方便我用转换器把rgb换成了16进制)
在这里插入图片描述
2.我的按钮代码:主要注意type(可以自命名)

<el-button type="success">搜索</el-button>
<el-button type="warning">重置</el-button>

3. 他们的style

.el-button--success{background: #23C6C8;}
.el-button--warning{background: #FCB065;}

4. 那这个时候鼠标悬停、点击等还是原来颜色
在这里插入图片描述
打开网页F12:
在这里插入图片描述
找到了你要改的选项(active、hover、focus…)
直接写在你的style代码里

6. 现在的style

.el-button--success,.el-button--success:focus,.el-button--success.is-active, .el-button--success:active{background: #23C6C8;}
.el-button--warning,.el-button--warning:focus,.el-button--warning.is-active, .el-button--warning:active{background: #FCB065;}
.el-button--success:hover {
    background: #8cd8da;
    border-color: #8cd8da;
    color: #FFF;
}
.el-button--warning:hover {
    background: #f5d7b9;
    border-color: #f5d7b9;
    color: #FFF;
}

在这里插入图片描述

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐