【问题标题】:How to use a style tag in react?如何在反应中使用样式标签?
【发布时间】:2022-11-23 14:52:20
【问题描述】:
<script src="https://pie-meister.github.io/PieMeister-with-Progress.min.js"></script>
    
              <pie-chart className="nested" offset="top">
                 <style>
                  path {
            stroke-linecap: round;
            stroke-width: 90;
                  }
                  [color1] {
            stroke: #BFBDB2;
            stroke-width: 50;
                  }
                  [color2] {
            stroke: #26BDD8;
            stroke-width: 60;
                  }
                  [color3] {
            stroke: #824BF1;
                  }
                  [part="path"]:not([y]) {
                    stroke: #BFBDB2;
                    stroke-width: 60;
            opacity: 0.4;
                  }
                </style> 

我正在使用这个库 pie-master 并且它具有如上所示的样式属性。 我想在反应中实现类似的东西。

【问题讨论】:

    标签: html css reactjs tags styles


    【解决方案1】:

    <Component style={{color: "red"}} />

    【讨论】:

      猜你喜欢
      • 2020-06-29
      • 2021-07-25
      • 2019-03-05
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-10
      • 2019-10-09
      相关资源
      最近更新 更多