0

I am new to css and html and I am trying to recreate the behavior enter image description here whereby a group is sticky and once it is sticky I add a bottom shadow. I manage to make the element sticky by applying this code:

<style>
#sticky-top {
    position: sticky;
    top: 0px;
    z-index: 9999
    }
</style>

but now I dont know where to start to add the shadow only when the group is stuck at the top. do you have an idea? thanks

daniell
  • 169
  • 1
  • 9
  • Take a look at this discussion https://stackoverflow.com/questions/25308823/targeting-positionsticky-elements-that-are-currently-in-a-stuck-state – Ivan Beliakov Dec 25 '22 at 20:06
  • ah, from what I see I guess it is too complicated and probably not worth the time. thanks – daniell Dec 25 '22 at 20:09
  • 1
    Box-shadow is the way to go it applies to element in general and you can change the behaviour of the element using other properties as such (eg,sticky and so on) – innocent Dec 25 '22 at 20:13

0 Answers0