javascript - How to change color :hover of ant-menu-submenu-arrow in AntD menu component for Vue.js? - Stack Overflow

I'm using Ant Design (antd) ponents library for Vue.js.The menu ponent is quite simple to use:

I'm using Ant Design (antd) ponents library for Vue.js. The menu ponent is quite simple to use: /ponents/menu/

I just want to change the ":hover" color of links (from default blue to red), which is possible by overriding CSS classes. But is very difficult to me (avoid using ugly workarounds) to change also the color of the "submenu arrow", which remains blue.

Here is a simple example:

Anybody has already tried?

I'm using Ant Design (antd) ponents library for Vue.js. The menu ponent is quite simple to use: https://vue.ant.design/ponents/menu/

I just want to change the ":hover" color of links (from default blue to red), which is possible by overriding CSS classes. But is very difficult to me (avoid using ugly workarounds) to change also the color of the "submenu arrow", which remains blue.

Here is a simple example: https://codesandbox.io/embed/vue-antd-sub-menu-arrow-color-34vlx

Anybody has already tried?

Share Improve this question edited Sep 10, 2019 at 13:15 matteogll asked Sep 10, 2019 at 12:57 matteogllmatteogll 9511 gold badge11 silver badges18 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

Try with

.ant-menu-submenu-title:hover {
    .ant-menu-submenu-arrow::before, .ant-menu-submenu-arrow::after {
        background: red!important;
    }
}

But use lang="scss" on your style tag so you can pile scss or just fix my script with css syntax.

Try this within the style tag:

.ant-menu-submenu-arrow {
  ::before {
    background: red
  }
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744789115a4593806.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信