我想将“添加到购物车”按钮的颜色从蓝色完全更改为黑色
实际上我成功地改变了颜色但是当点击按钮时,它显示
它现有的“蓝色”颜色作为“正在加载”文本。我从
尝试了这个改变catalog/view/theme/default/stylesheet/stylesheet.css.
谢谢
最佳答案
您需要找到所有按钮的默认类。假设该类是 .button
,那么您可以在悬停、事件等所有条件下对此类应用 css。
.button, .button:hover, .button:focus, .button:active, .button.active{
color:#000;
}
通过这种方式,您可以针对所有这些条件完全处理此按钮,或者如果我遗漏了任何条件,则可能会处理更多条件。
Right now the condition for your problem is
:focus
but handling all the situation will reduces chances for error in future.
关于css - 如何在 opencart 2.1.0.1 中更改 "Add to cart"按钮颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36546204/