【问题标题】:Change CSS style of timescale buttons in Plotly Timeseries Chart在 Plotly Timeseries Chart 中更改时间刻度按钮的 CSS 样式
【发布时间】:2020-10-04 12:55:47
【问题描述】:

我对 Dash/Plotly 很陌生,我正在尝试使用 CSS 设置时间刻度按钮的样式,但似乎没有一个类对我应用的样式做出反应。我有类似的东西:

Plotly Time Series Chart

https://plotly.com/python/time-series/

我的目标是用圆角使按钮更大、更暗。通常我会这样做:

    button  {
  margin-left: 15px;
  margin-right: 15px;
  height: 45px;
  width: 70px;
  border-radius: 10%;
  color: white;
  font-weight: bold;
  background-color: #80848d;
}

但在这种情况下,按钮似乎有一个标签和一个预先设置样式的选择器矩形类。 到目前为止,有人设法解决了这个问题吗?

【问题讨论】:

    标签: javascript python html css plotly-dash


    【解决方案1】:

    您可以使用预先设置样式的同一类来覆盖您的样式,并为您的样式添加!important

    .class-pre-styled
    {
      margin-left: 15px!important;
      margin-right: 15px!important;
    }
    

    希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-06
      • 2021-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-18
      • 2012-11-13
      • 1970-01-01
      相关资源
      最近更新 更多