如何覆盖 ng2 pdf 查看器 css [英] how to override ng2 pdf viewer css
本文介绍了如何覆盖 ng2 pdf 查看器 css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在有角度的材质对话框中渲染 pdf.我在检查时使用
.ng2-pdf-viewer-container[_ngcontent-c13] {溢出-x:自动;}
到
.ng2-pdf-viewer-container[_ngcontent-c13] {宽度:100%;}
我试过 !important 但它不起作用
怎么做?
解决方案
这对我有用
:host ::ng-deep .ng2-pdf-viewer-container {宽度:100%!重要;
}
I am rendering pdf in a angular material dialog. I am using ng2-pdf-viewer when I inspect, I see container width is very small which I want to increase. So, I want to change
.ng2-pdf-viewer-container[_ngcontent-c13] {
overflow-x: auto;
}
to
.ng2-pdf-viewer-container[_ngcontent-c13] {
width: 100%;
}
I tried !important but it is not working
How to do that?
解决方案
this worked for me
:host ::ng-deep .ng2-pdf-viewer-container {
width: 100% !important;
}
这篇关于如何覆盖 ng2 pdf 查看器 css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文