如何让uikit.sticky保持领先

时间:2016-03-03 04:43:49

标签: css getuikit

我尝试关注主网getuikit > component > sticky,但向下滚动粘贴的问题是有效的,例如" .uk-panel" css课程,它似乎位于" .uk-stick"。

之上

我需要解决。

描述图像问题

The problem with it ".uk-panel" .

<nav className="uk-navbar" data-uk-sticky="{top:-100, animation: 'uk-animation-slide-top'}" >
                <Link to="/" className="uk-navbar-brand">
                    <i className="uk-icon-hover uk-icon-graduation-cap"></i>
                </Link>
                <div className="uk-navbar-flip">
                    <ul className="uk-navbar-nav">
                        <li>
                            <Link to="/register" className="uk-button">Register</Link>
                        </li>
                        <li>
                            <Link to="/signin" className="uk-button">SignIn</Link>
                        </li>
                    </ul>
                </div>
            </nav>
            <div  className="uk-container uk-container-center" style={height:3000px;}>
                <div class="uk-panel uk-panel-box uk-panel-box-primary">
                            <h3 class="uk-panel-title">Box primary</h3>
                            Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipisicing elit.
                        </div>

                        <div class="uk-panel uk-panel-box uk-panel-box-secondary">
                            <h3 class="uk-panel-title">Box secondary</h3>
                            Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipisicing elit.
                        </div>
            </div>

1 个答案:

答案 0 :(得分:1)

尝试:

nav {
z-index:999;
}

最后添加:

.uk-panel {
z-index: 100; //or something less
}