1

I am using ngx-perfect-scrollbar on div element like this:

<div [perfectScrollbar]="config" [ngStyle]="{ 'max-height': '60vh', position: 'relative' }">
.
.
.
.
</div>

But the scrollbar is visible only when I hover mouse over the div element of scrollbar. How do I make this visible all the time?

DevLoverUmar
  • 11,809
  • 11
  • 68
  • 98

2 Answers2

2

Perfect scrollbar is hidden by opacity.

You can give perfect scrollbar already declared class:

ps-show-always

Which adds this:

perfect-scrollbar.ps-show-always > .ps.ps--active-y > .ps__rail-y,
perfect-scrollbar.ps-show-always > .ps.ps--active-x > .ps__rail-x {
  opacity: 0.6;
}
empeK
  • 121
  • 4
0

I fixed problem by adding the following styles to my global styles.scss

.ps > .ps__rail-x,
.ps > .ps__rail-y {
  opacity: 0.6;
}

These styles are applied on perfect-scrollbar, as ngx-perfect-scrollbar is using perfect-scrollbar behind the scene.

DevLoverUmar
  • 11,809
  • 11
  • 68
  • 98