mirror of https://github.com/twbs/bootstrap.git
				
				
				
			Docs: fix some ScrollSpy HTML copyable codes (#36672)
This commit is contained in:
		
							parent
							
								
									c1813ef2bc
								
							
						
					
					
						commit
						547aa099ea
					
				|  | @ -162,6 +162,7 @@ Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its p | |||
| </div> | ||||
| 
 | ||||
| ```html | ||||
| <div class="row"> | ||||
|   <div class="col-4"> | ||||
|     <nav id="navbar-example3" class="h-100 flex-column align-items-stretch pe-4 border-end"> | ||||
|       <nav class="nav nav-pills flex-column"> | ||||
|  | @ -212,6 +213,7 @@ Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its p | |||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </div> | ||||
| ``` | ||||
| 
 | ||||
| ### List group | ||||
|  | @ -244,6 +246,7 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group | |||
| </div> | ||||
| 
 | ||||
| ```html | ||||
| <div class="row"> | ||||
|   <div class="col-4"> | ||||
|     <div id="list-example" class="list-group"> | ||||
|       <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> | ||||
|  | @ -264,6 +267,7 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group | |||
|       <p>...</p> | ||||
|     </div> | ||||
|   </div> | ||||
| </div> | ||||
| ``` | ||||
| 
 | ||||
| ### Simple anchors | ||||
|  | @ -299,8 +303,9 @@ Scrollspy is not limited to nav components and list groups, so it will work on a | |||
| </div> | ||||
| 
 | ||||
| ```html | ||||
| <div class="row"> | ||||
|   <div class="col-4"> | ||||
|   <div id="list-example" class="d-flex flex-column gap-2 simple-list-example-scrollspy text-center"> | ||||
|     <div id="simple-list-example" class="d-flex flex-column gap-2 simple-list-example-scrollspy text-center"> | ||||
|       <a class="p-1 rounded" href="#simple-list-item-1">Item 1</a> | ||||
|       <a class="p-1 rounded" href="#simple-list-item-2">Item 2</a> | ||||
|       <a class="p-1 rounded" href="#simple-list-item-3">Item 3</a> | ||||
|  | @ -309,7 +314,7 @@ Scrollspy is not limited to nav components and list groups, so it will work on a | |||
|     </div> | ||||
|   </div> | ||||
|   <div class="col-8"> | ||||
|   <div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-offset="0" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> | ||||
|     <div data-bs-spy="scroll" data-bs-target="#simple-list-example" data-bs-offset="0" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> | ||||
|       <h4 id="simple-list-item-1">Item 1</h4> | ||||
|       <p>...</p> | ||||
|       <h4 id="simple-list-item-2">Item 2</h4> | ||||
|  | @ -322,6 +327,7 @@ Scrollspy is not limited to nav components and list groups, so it will work on a | |||
|       <p>...</p> | ||||
|     </div> | ||||
|   </div> | ||||
| </div> | ||||
| ``` | ||||
| 
 | ||||
| ## Usage | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue