Setting Custom Anchorpoint

前端 未结 1 1619
别跟我提以往
别跟我提以往 2021-01-27 16:53

Is there a way to set anchor points customley, in positions outside of where the actual HTML mark up is?

I\'m using this simple parallax scrolling script called \'

相关标签:
1条回答
  • 2021-01-27 17:08

    Since a is not a block element, margin-top will not work as expected.

    Here's some modified CSS:

    .anchor {
      display: block;
      position: relative; /* relative to the parent container, needed for top/left positioning*/
      top: -200px;
    }
    
    0 讨论(0)
提交回复
热议问题