简体   繁体   English

是否可以为均衡器高度添加额外的高度?

[英]Is it possible to add an extra height to equalizer height?

I need to add an extra 35px to whatever the height calculated by Foundation Equalizer.我需要为 Foundation Equalizer 计算的任何高度添加额外的 35px。 Is this possible?这可能吗?

For example, if Equalizer height calculation is 350px, I would like 35px to be added on.例如,如果均衡器高度计算为 350 像素,我希望添加 35 像素。 So style created will be height: 385px;所以创建的样式将是height: 385px; instead of height: 350px;而不是height: 350px; . .

Thank you.谢谢你。

Init Foundation with this code:使用以下代码初始化基金会:

$(document).foundation({
  equalizer: {
    after_height_change: function(){
      $('div[data-equalizer-watch]').height(function (index, height) {
          return (height + 35);
      });
    }
  }
});

CodePen example代码笔示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM