Create Sticky Element
-
Hi there,
I hope you are well and can help me with the following:
I want to create a sticky element and I have a pretty good result so far with the following CSS:
.element{ margin-top: -500px; position: fixed; width: 1130px; background-color: #ffffff; opacity: 90%; z-index: 10; }
However, I would like the sticky effect to occur once the element reaches the top of the screen. With
.element{ position: sticky; top: 0; {
and.element{ position: fixed; top: 0; {
I could not achieve this.I would be very happy if you can help me this time as well.
Kind reagrds
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Create Sticky Element’ is closed to new replies.