更改ng-multiselect-dropdown的CSS [英] changing css of ng-multiselect-dropdown
本文介绍了更改ng-multiselect-dropdown的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在ng-multiselect-dropdown中更改CSS.
I want to change the css in ng-multiselect-dropdown.
<ng-multiselect-dropdown
[placeholder]="'Choose'"
[data]="dropdownList"
[(ngModel)]="selectedItems"
[settings]="dropdownSettings"
(onSelect)="onItemSelect($event)"
(onSelectAll)="onSelectAll($event)"
name="domain"
>
</ng-multiselect-dropdown>
在调用html页面上的下拉菜单之前,我尝试添加以下内容,但这无济于事.
I tried adding the following before i am calling the dropdown on html page but it doesnt help.
<style>ng-multiselect-dropdown >.dropdown-list[_ngcontent-c6] li[_ngcontent-c6] {
padding: 16px 10px;
cursor: pointer;
text-align: left;
}
有人可以帮我吗?
推荐答案
尝试在组件的CSS文件中添加以下代码
try adding the following code in your component's css file
::ng-deep .multiselect-dropdown .dropdown-btn{
// add your own styles here.
// eg. min-height:5px;
}
这篇关于更改ng-multiselect-dropdown的CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文