简体   繁体   English

高幻灯片页内画廊被自举词损坏

[英]Highslide in-page gallery gets broken by bootstrap affix

I've got a highslide gallery in my page http://civicsector.org.ua/multimeda/foto/208-akcya-geroyi-nezalezhnost.html 我的页面上有一个高滑画廊, 网址为http://civicsector.org.ua/multimeda/foto/208-akcya-geroyi-nezalezhnost.html

However, the page also contains a bootstrap affix at its top, which appears when you scroll down the page a bit. 但是,页面的顶部还包含一个引导词缀 ,当您向下滚动页面时会出现该词缀

If you open the page and wait (without performing scrolling) until the gallery fully loads, the gallery is placed just the way it should . 如果您打开页面并等待 (不执行滚动)直到画廊完全加载,则画廊将以应有的方式放置。

However, if after that you scroll down so that the affix gets shown, and click to view the next image , the whole gallery moves up so that it actually overlays the previous layout block containing the article text. 但是,如果在那之后向下滚动以便显示词缀,然后单击以查看下一张图片 ,则整个图库将向上移动,从而使其实际上覆盖包含文章文本的前一个版式块。

It seems like upon the bootstrap affix appearance some kind of a gallery 'refresh' should be fired so that highslide recalculates the gallery position. 似乎在自举词缀外观上应触发某种类型的“刷新”画廊,以便高幻灯片重新计算画廊的位置。 How do I achieve that? 我该如何实现?

Thanks. 谢谢。

When affix kicks in, the affixed div is removed from the normal flow of the page which causes the parent div div to collapse. 当附加词缀插入时,附加的div将从页面的常规流程中移除,这会导致父div div崩溃。

Fix: Wrap the affixed div in a new div. 修复:将附加的div包装到新的div中。 Give this dix two different height , or hide it, based on the break point of the affixed div (the menu) - which seems to be 1199px and 979px. 根据附加的div(菜单)的断点,为该dix设置两个不同的height ,或将其隐藏-似乎分别为1199px和979px。

HTML: HTML:

<div class="affix-wrapper">
    <div data-spy="affix" data-offset-top="250" class="your classes here">
        <!-- content of the div -->
    </div>
</div>


CSS: CSS:

.affix-wrapper {
    height: 70px;
}
@media (max-width: 1199px){
    .affix-wrapper {
        height: 139px;
    }
}
@media (max-width: 979px){
    .affix-wrapper {
        display: none;
    }
}

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

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