Angular ngx dropzone定制css

Angular ngx dropzone定制css,css,angular,Css,Angular,我是一个后端开发人员,不擅长解决css问题。我需要更改ngx dropzone按钮的边框。我已经写了一个css代码块来解决这个问题,但是边框没有改变 我怎样才能解决这个问题 dropzone>.dropzone.dz-wrapper .dz-message { background-color: #eee; border: none !important; /* I would like to change here.*/ display: inline-block; margin: 8

我是一个后端开发人员,不擅长解决css问题。我需要更改ngx dropzone按钮的边框。我已经写了一个css代码块来解决这个问题,但是边框没有改变

我怎样才能解决这个问题

dropzone>.dropzone.dz-wrapper .dz-message {
background-color: #eee;
border: none !important;  /* I would like to change here.*/
display: inline-block;
margin: 8px;
max-height: 100%;
max-width: calc(100% - 16px);
min-height: 40px;
min-width: calc(100% - 16px);
overflow: auto;
position: relative;
width: calc(100% - 16px); }

这里的问题是
视图封装

Angular封装您的样式,以防止它们渗入其他区域,因此,当您尝试为组件外部生成的元素(即
的内容)设置样式时,您需要打破封装

dropzone ::ng-deep .dropzone.dz-wrapper .dz-message {
    border: none !important;
}

还请注意,您只需要包括实际要替代的样式。您未覆盖的任何内容都将保持不变。

看起来您的更改没有正确送达。您确定在进行更改后已重建项目并刷新了页面吗?我确定在进行更改后已刷新页面,并且重建了项目@SimonKTo澄清一下,您是添加了整个css代码块来尝试修改边框,还是编辑了现有的css并只更改了一行?你的描述暗示了前者。我在Chrome上找到了现有的css代码块,并复制了它,然后我将代码块粘贴到了一个名为timeline-create-post.component.css的css文件中。最后,我只更改了一行关于ngx dropzone按钮边界的内容。此外,我已经改变了随机css类的实验目的,它的工作,但我不能自定义ngx dropzone css样式@SimonKIf如果您想检查css文件,下面是我的实现@西蒙克非常感谢你。我是一个初学者的角度。你的答案对于学习新的有益信息非常有价值。