mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-26 01:00:24 +00:00
relative not absolute
This commit is contained in:
parent
6d882a6420
commit
d787cffc5a
1 changed files with 1 additions and 1 deletions
|
|
@ -670,7 +670,7 @@ $('#myDropdown').on('show.bs.dropdown', function () {
|
|||
<h2 id="scrollspy-usage">Usage</h2>
|
||||
|
||||
<h3>Requires relative positioning</h3>
|
||||
<p>No matter the implementation method, scrollspy requires the use of <code>position: absolute;</code> on the element you're spying on. In most cases this is the <code><body></code>.</p>
|
||||
<p>No matter the implementation method, scrollspy requires the use of <code>position: relative;</code> on the element you're spying on. In most cases this is the <code><body></code>.</p>
|
||||
|
||||
<h3>Via data attributes</h3>
|
||||
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code><body></code>). Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue