【问题标题】:Change element style in custom css WP在自定义 css WP 中更改元素样式
【发布时间】:2015-01-25 06:00:54
【问题描述】:

我有一个 WP,我想在其中更改元素样式。

这是我使用 firebug 检查时控制台中的内容:

<div class="et_pb_container clearfix" style="min-height: 400px;">

然后在样式的右侧我有

element.style {
min-height: 400px;
}

如何在自定义 CSS 编辑器中更改 element.style?

我希望最小高度为 550 像素;

当我尝试使用时

et_pb_container.clearfix{
min-height: 550px;
}

什么都没有发生.....

请指教。

【问题讨论】:

    标签: css wordpress wordpress-theming


    【解决方案1】:

    在你的样式表中试试这个:

    .et_pb_container.clearfix[style] {
      min-height: 550px !important;
    }
    

    【讨论】:

      【解决方案2】:

      试试:

      .et_pb_container.clearfix{
          min-height: 550px !important;
      }
      

      或者改变内联样式的最小高度:

      <div class="et_pb_container clearfix" style="min-height: 550px;">
      

      内联样式通常优先于 CSS 样式表,除非您指定 !important 关键字。

      http://css-tricks.com/override-inline-styles-with-css/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-12-21
        • 2021-12-11
        • 2017-02-26
        • 2012-08-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多