the behaviour of top: auto; bamboozles me

后端 未结 4 1807
死守一世寂寞
死守一世寂寞 2020-12-02 01:46

Hi I\'m really confused about some basics with absolute positioning.



    


        
4条回答
  •  佛祖请我去吃肉
    2020-12-02 02:08

    Using auto for top (or left) tells the browser to position an element in the exact same way it would if the element had 'position: fixed'.

    This jsfiddle demonstrates what I mean: http://jsfiddle.net/kUmKW/

    Try changing the value of left or top from auto to see what happens.

提交回复
热议问题