场景:确认按钮发布后样式发生改变,发布后,点击确认按钮,背景色消失,添加红色focus即可
<el-button type="text" class="ok" size="medium" @click="issue">确认</el-button> .ok { width: 150px; font-size: 14px; background: #429e73; color: #fff; } .ok:hover { background: #006636; color: #fff; } .ok:focus { background: #006636; color: #fff; }
原文链接:https://blog.csdn.net/wwf1225/article/details/104051471