2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

docs: switch to fenced codeblocks (#31806)

This commit is contained in:
XhmikosR
2020-10-19 12:56:49 +03:00
committed by GitHub
parent 48177c946f
commit e6618a6ebb
43 changed files with 494 additions and 446 deletions
+8 -8
View File
@@ -10,33 +10,33 @@ toc: true
Position an element at the top of the viewport, from edge to edge. Be sure you understand the ramifications of fixed position in your project; you may need to add additional CSS.
{{< highlight html >}}
```html
<div class="fixed-top">...</div>
{{< /highlight >}}
```
## Fixed bottom
Position an element at the bottom of the viewport, from edge to edge. Be sure you understand the ramifications of fixed position in your project; you may need to add additional CSS.
{{< highlight html >}}
```html
<div class="fixed-bottom">...</div>
{{< /highlight >}}
```
## Sticky top
Position an element at the top of the viewport, from edge to edge, but only after you scroll past it. The `.sticky-top` utility uses CSS's `position: sticky`, which isn't fully supported in all browsers.
{{< highlight html >}}
```html
<div class="sticky-top">...</div>
{{< /highlight >}}
```
## Responsive sticky top
Responsive variations also exist for `.sticky-top` utility.
{{< highlight html >}}
```html
<div class="sticky-sm-top">Stick to the top on viewports sized SM (small) or wider</div>
<div class="sticky-md-top">Stick to the top on viewports sized MD (medium) or wider</div>
<div class="sticky-lg-top">Stick to the top on viewports sized LG (large) or wider</div>
<div class="sticky-xl-top">Stick to the top on viewports sized XL (extra-large) or wider</div>
{{< /highlight >}}
```