您的位置:首页 > Web前端 > CSS

【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep

2017-12-01 17:51 627 查看
在ng-Zorro-Ui 阿里组件框架无法修改第三方组件的样式问题:

<nz-input  formControlName="userName" [nzPlaceHolder]="'Username'" [nzSize]="'large'">
<ng-template #prefix>
<i class="anticon anticon-user" style="font-size:20px"></i>
</ng-template>
</nz-input>


浏览器渲染:



css修改:无效

.ant-input-affix-wrapper .ant-input:not(:first-child){
padding-left: 30px;
}


修改上面就正常了

:host ::ng-deep .ant-input-affix-wrapper .ant-input:not(:first-child){
padding-left: 30px;
}


angular、spring cloud 开源实战项目源码:https://gitee.com/xfdm/FCat

QQ群:549141844

代码持续更新…
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  angular 框架 阿里
相关文章推荐