Try to scroll inside this frame to understand how sticky positioning works.
Note: IE/Edge 15 and earlier versions do not support sticky position.
I am sticky!
In this example, the sticky element sticks to the top of the page (top: 0), when you reach its scroll position.
Scroll back up to remove the stickyness.
Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.
Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.
```
```css
#content{
max-width: 250px;
padding: 50px;
}
.sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
padding: 5px;
background-color: #cae8ca;
border: 2px solid #4CAF50;
}
```
---
# Exercici Mario
- [Exercici Mario](exercicis/04_exercicis_css.html#exercici-mario)