【问题标题】:aria-hidden=true makes height divaria-hidden=true 使高度 div
【发布时间】:2015-08-17 11:03:55
【问题描述】:

我有一个幻灯片,它提供了 2 个显示为 [aria-hidden=true] 的元素。我需要容器使用具有 [aria-hidden=true] 的 2 个元素进行缩放。

有人知道如何在 Jquery 中编写脚本吗?

提前致谢

【问题讨论】:

    标签: jquery hidden wai-aria


    【解决方案1】:

    我不是 100% 确定你在这里问什么。如果可能,请提供一些示例代码。

    但是,也许这样的事情会起作用:

    $('[aria-hidden="true"]')
        .parent()
        .css({
            height: '100%'
    });
    

    否则,这里有一些 stackoverflow 文章可能会为您指明正确的方向:

    jQuery: Get height of hidden element in jQuery

    Using jQuery to adjust a parent element's height to match it's visible child's height

    how to overwrite css height set by jquery/javascript?

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-07
      • 2022-11-09
      • 1970-01-01
      相关资源
      最近更新 更多