擅长:python、mysql、java
<p>将此添加到css文件:</p>
<pre><code>.uk-fixed-navigation {
position: fixed;
right: 0;
left: 0;
top: 0;
z-index: 1030;
}
</code></pre>
<p>并将<code>uk-fixed-navigtion</code>类添加到导航栏中。在</p>
<p><strong>编辑</strong></p>
<p>您也可以使用他们的<a href="http://getuikit.com/docs/sticky.html" rel="nofollow"><em>sticky</em> component</a></p>