【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
2017-12-01 17:51
260 查看
在ng-Zorro-Ui 阿里组件框架无法修改第三方组件的样式问题:
浏览器渲染:
css修改:无效
修改上面就正常了
angular、spring cloud 开源实战项目源码:https://gitee.com/xfdm/FCat
QQ群:549141844
代码持续更新…
<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】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep
- 【Angular】关于angular引用第三方组件库无法改变其组件样式 :host ::ng-deep