Day 89/100 Sticky
Rio Cantre
Posted on December 13, 2021
To make something relevant, one must have an idea to make it more functional and stick to that proposal to make it workable and effective. A strategy that makes sense when everything seems not working according to plan and puts out another method to get through the hurdles on the way. After achieving the designated position, one would benefit from the changes ahead because it possesses the role before claiming it to be the actual holder. Often, the highest rank is compost of a mountain of irrelevant ideas and make things work by gaining support on small strategies that are anonymous and unknown to the public.
Position
The default position of an element can be changed by setting its position property. The position property can take one of five values:
-
static
- the default value (it does not need to be specified) relative
absolute
fixed
sticky
Sticky
- The
sticky
value is another position value that keeps an element in the document flow as the user scrolls, but sticks to a specified position as the page is scrolled further. This is done by using thesticky
value along with the familiar offset properties, as well as one new one.
Code Snippets
let groceryItem = 'papaya';
switch (groceryItem) {
case 'tomato':
console.log('Tomatoes are $0.49');
break;
case 'lime':
console.log('Limes are $1.49');
break;
case 'papaya':
console.log('Papayas are $1.29');
break;
default:
console.log('Invalid item');
break;
}
a11y myths
Blind people don't watch movies
They definitely do. With the help of audio descriptions they can watch and listen to any media content as all other people do.
Posted on December 13, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.