简体   繁体   English

Primeng v11 进度微调器不变色

[英]Primeng v11 progress spinner does not change color

I'm using primeng version 11, and I'm trying to change the color of the spinner bar, I tried copying the code form primeng but it did not work for me.我使用的是primeng 版本11,我正在尝试更改微调栏的颜色,我尝试复制primeng 的代码表,但它对我不起作用。

html: <p-progressSpinner [style]="{width: '50px', height: '50px'}" styleClass="custom-spinner"></p-progressSpinner> html: <p-progressSpinner [style]="{width: '50px', height: '50px'}" styleClass="custom-spinner"></p-progressSpinner>

css: css:

@keyframes custom-progress-spinner-color {
    100%,
    0% {
        stroke: #16697A;
    }
    40% {
        stroke: #489FB5;
    }
    66% {
        stroke: #82C0CC;
    }
    80%,
    90% {
        stroke: #FFA62B;
    }
}

module is imported and checked everything.模块被导入并检查一切。

You should putt the following CSS (In my example it's SASS) before your '@keyframes' code block:您应该在“@keyframes”代码块之前放置以下 CSS(在我的示例中是 SASS):

.ui-progress-spinner {
  &.custom-spinner {
    .ui-progress-spinner-circle {
      animation:
        ui-progress-spinner-dash 1.5s ease-in-out infinite,
        custom-progress-spinner-color 6s ease-in-out infinite;
     }
   }
 }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM