<el-button @click="toggleDropdown" class="custom_button">新建工单</el-button>
<style>
.custom_button{
background-color: #0FB3B3; /* 设置按钮的颜色 */
color: #fff;
}
/* 点击时保持颜色不变 */
.custom_button:hover {
color: #fff;
background-color: #0FB3B3 !important; /* 点击时保持颜色不变 */
}
/* 点击时保持颜色不变 */
.custom_button:active {
background-color: #0FB3B3 !important; /* 点击时保持颜色不变 */
}
.custom_button:focus {
color: #fff;
background-color: #0FB3B3 !important; /* 点击时保持颜色不变 */
}
</style>
el-button设置了按钮的颜色,如何能点击按钮不让其变色,依旧保持设置的颜色
最新推荐文章于 2024-09-12 16:42:00 发布