【问题标题】:Definition List Formatting Not Working As Intended定义列表格式未按预期工作
【发布时间】:2015-01-17 06:37:48
【问题描述】:

通过尝试复制我喜欢的产品页面,我了解了更多关于定义列表的信息。

正确添加标签并注意到它们具有一些自然的样式。

我在 google 上找到了这段代码,并将其添加到我的主题的 custom.css 文件中,它没有改变任何东西。

dt {
    font-weight: bold;
    text-decoration: underline;
  }
  dd {
    margin: 0;
    padding: 0 0 0.5em 0;
  }

谁能告诉我为什么?

谢谢!

【问题讨论】:

    标签: html css wordpress formatting wordpress-theming


    【解决方案1】:

    一些代码会很好,将您的代码复制到jsfiddle 并设置示例。可能它被默认样式覆盖了尝试将 !important 添加到 css 属性。

    dt {
        font-weight: bold important;
        text-decoration: underline important;
      }
      dd {
        margin: 0 !important;
        padding: 0 0 0.5em 0 important;
      }
    

    这将覆盖任何 css 属性,但您应该仅将其用于测试。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-03
      • 1970-01-01
      • 1970-01-01
      • 2022-11-11
      • 2018-03-09
      • 1970-01-01
      相关资源
      最近更新 更多