例如,p-inputext被p填充 p-dropdown应该有什么?不过,两者都很有针对性
.p-inputtext:enabled.p-filled { border: 1px solid $twenty; } ::ng-deep .p-dropdown { background-color: initial; border: none; border-radius: 0%; border: solid 1px #ddd; min-width: 30rem; height: 5.5rem; width: 100%; }
您更新的CSS 结合这些,你更新的CSS可能看起来像这样:
::ng-deep .p-dropdown { background-color: initial; border: none; border-radius: 0%; border: solid 1px #ddd; min-width: 30rem; height: 5.5rem; width: 100%; } ::ng-deep .p-dropdown:not(.p-dropdown-label-empty) .p-dropdown-label { border: 1px solid $twenty; background-color: #f0f8ff; } ::ng-deep .p-dropdown .p-dropdown-label.p-dropdown-label-empty { color: gray; font-style: italic; } ::ng-deep .p-dropdown:focus { outline: none; border: 1px solid blue; }