【问题标题】:wordpress min-height doesn't workwordpress 最小高度不起作用
【发布时间】:2017-01-24 20:27:53
【问题描述】:

我有一个 WordPress 网站 http://fa.tamidhco.ir/。 第一次加载页面时,带有caroufredsel_wrapper 类的 div 底部有一个空白区域。 似乎 height 属性随着 jQuery 的变化而变化。我应该怎么做,高度属性会随着内容的变化而变化?

<div class="caroufredsel_wrapper" style="display: block; text-align: start; float: none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: auto; width: 703px; height: 724px; margin: 0px; overflow: hidden; cursor: move;">
  <ul class="offer_thumb_ul" style="text-align: left; float: none; position: absolute; top: 0px; right: auto; bottom: auto; left: 0px; margin: 0px; width: 4921px; height: 724px;"><li class="offer_thumb_li id_1" style="width: 703px;">
    <div class="image_wrapper">

【问题讨论】:

标签: wordpress html css wordpress-theming


【解决方案1】:

首先您需要通过 jQuery 获取“caroufredsel_wrapper”类的实际高度。

var heightofdiv = $( ".caroufredsel_wrapper" ).innerHeight();

然后你可以通过 jQuery css 应用高度。

$(".caroufredsel_wrapper").css("height", heightofdiv);

【讨论】:

    猜你喜欢
    • 2013-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-06
    • 1970-01-01
    • 1970-01-01
    • 2020-01-29
    • 1970-01-01
    相关资源
    最近更新 更多