<分区>
我在我的元素中使用 mat-selection-list
组件。我在下图中显示了一些名称:
我想知道,为什么边框在点击滚动条时突出显示,如上图所示,我怎样才能避免背景中的边框
:
HTML
<mat-selection-list>
<mat-list-option *ngFor="let player of Players">
<a mat-list-item><span>{{ player }}</span> </a>
</mat-list-option>
</mat-selection-list>
CSS
mat-selection-list{
position:relative;
margin-top:-20.5px;
width:100%;
height:80vh;
overflow-y: scroll;
}
::ng-deep.mat-pseudo-checkbox{
display: none !important;
}
TS
import {Component,ViewChild} from '@angular/core';
@Component({
selector: 'list-selection-example',
styleUrls: ['list-selection-example.scss'],
templateUrl: 'list-selection-example.html',
})
export class ListSelectionExample {
Players: string[] = ['Sachin Tendulkar', ........ 'Anil Kumble'];
}
DEMO :