【问题标题】:How I can override specific css styles from react big calendar我如何从反应大日历中覆盖特定的 CSS 样式
【发布时间】:2017-07-14 09:29:50
【问题描述】:

我在 sharePoint Web 部件中使用了一个反应大日历。所以这种来自大日历外部 css 的样式隐藏了我的月历:

.rbc-month-row {
    display: flex; 
    overflow: hidden;
}

我得到以下图片: 因此,当我从 chrome 禁用此样式时,没关系: 我尝试从我自己的 css 中禁用这种样式,但它不起作用:

.rbc-month-row {
  overflow: visible !important;
  display: block !important;
}

那么我怎样才能通过其他方式禁用这种样式呢?

【问题讨论】:

    标签: css calendar react-big-calendar


    【解决方案1】:

    解决方案是将 flex-basis 属性更改为 auto ,如下所示:

    flex-basis: auto;
    

    【讨论】:

      【解决方案2】:

      在这里,您需要确保您的 css 包含在 react 大日历 css 文件之后,如下所示。 示例:

      1. react big calendar.css
      2. <custom.css>.
      

      如果是这样,那么它将起作用并确保其他样式可能不会影响此类。

      【讨论】:

      • 感谢您的回答。我将这两个 css 文件都包含到我的项目中。其他样式不影响这个类。但是我被覆盖的样式不起作用:0
      猜你喜欢
      • 2022-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-10
      相关资源
      最近更新 更多