onclick button border color change

梦想的初衷 提交于 2019-12-12 03:15:47

问题


Should be fairly simple but I'm lost and all searches result in non-specific answers that don't directly relate to my issue.

Button, border is black but apparently, the "depressed" feel is achieved by changing the border color to black so when I do click the button, it feels "dead". Nothing happens, so it's hard to tell if you miss-clicked or what.

How do you change the "onclick" border color? That way, it can get that "depressed" look again.

.addButton {
border-color:black;
border-width:1px;
background-color:#00B0F0;
text-decoration:underline;
}

回答1:


The best solution is to use css, try the following code:

 .addButton:active, 
 .addButton:focus 
 {
     border:0.5em solid #00c; /* here configure as your needs */
     color:#00c;
  }

Hope that helps!



来源:https://stackoverflow.com/questions/9729095/onclick-button-border-color-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!