【问题标题】:Why h1 can not be colored only inline? [closed]为什么 h1 不能仅内联着色? [关闭]
【发布时间】:2021-10-27 11:58:07
【问题描述】:

我有这个反应渲染代码:

{props.isProductContainerVisible && (
  <div className={styles.productContainer}>
    <h1 className={styles.productH1}>We send it</h1>

和css:

.productH1 {
  margin-top: 167px; /*255-88*/
  color: "yellow" !important;
  font-size: "80px" !important;
  font-family: "TTHoves-Regular";
}

colorfont-size 这两种样式不适用。即使使用了important。但如果它是内联的,它就可以工作。

【问题讨论】:

    标签: css reactjs next.js inline


    【解决方案1】:

    没有引号。只需color: yellow !important;font-size: 80px !important;

    【讨论】:

      猜你喜欢
      • 2016-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-02
      • 2013-12-28
      • 1970-01-01
      • 1970-01-01
      • 2018-06-16
      相关资源
      最近更新 更多