简体   繁体   English

Angular 材料侧导航 hover

[英]Angular material sidenav hover

I am trying to build an Angular Sidebar.我正在尝试构建一个 Angular 侧边栏。 Currently, it is having a toggle effect which means, when we click it, it will collapse.目前,它具有切换效果,这意味着当我们单击它时,它会折叠。 If it is collapsed, it will expand.如果它被折叠,它会展开。 Now I am trying to expand only the item which gets hover.现在我试图仅扩展获得 hover 的项目。 I need some help with this.我需要一些帮助。

StackBlitz demo StackBlitz 演示

在此处输入图像描述

Here is the solution:这是解决方案:

I have made changes in your left-menu-component.html for that hover effect as you asked for.here is the link: https://stackblitz.com/edit/angular-w1b2ho?file=src%2Fapp%2Fcomponents%2Fleft-menu%2Fleft-menu.component.html I have made changes in your left-menu-component.html for that hover effect as you asked for.here is the link: https://stackblitz.com/edit/angular-w1b2ho?file=src%2Fapp%2Fcomponents%2Fleft -menu%2Fleft-menu.component.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM