css - 如何在 opencart 2.1.0.1 中更改 "Add to cart"按钮颜色?

标签 css opencart2.x

我想将“添加到购物车”按钮的颜色从蓝色完全更改为黑色

实际上我成功地改变了颜色但是当点击按钮时,它显示

它现有的“蓝色”颜色作为“正在加载”文本。我从

尝试了这个改变

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/

相关文章:

javascript - 根据屏幕上的位置动画指向 <li> 的箭头

php opencart 2.1.0.1 mysql查询错误: mysql_num_fields() expects parameter 1 to be resource object given in

css - 可以显示:box parent maintain their defined height instead of all becoming the same height?的子元素

php - 根据 opencart 2 中的语言更改 Logo

error-handling - Instamojo付款网关错误

php - 更新 opencart 数据库中的 php 选择值

php - 对使用类文件名快捷方式 OpenCart 感到困惑

javascript - 不褪色的 CSS 不透明度延迟

css - 仅使用 CSS,将鼠标悬停在另一个元素上时显示 div

html - 即使不需要,元素也会在 bootstrap 4 导航栏中折叠