Fixed vs. absolute

后端 未结 1 1685
生来不讨喜
生来不讨喜 2021-01-15 01:40

So I\'ve checked the site and I\'ve seen questions close to what I am looking for but not exactly the same.

I am trying to figure out how to position an element so t

相关标签:
1条回答
  • 2021-01-15 02:15

    if what you want is always fixed in some position even if the browser is scrolled / resized, you may try this for your css

    .fixedelement {
      position: fixed;
      top: 10%;
      left: 10%;
      width: 80%; /*my example*/
      height: 10%;
    }
    
    0 讨论(0)
提交回复
热议问题