jquery $('selector').css('top') returns different values for IE, firefox and Chrome

后端 未结 2 689
南笙
南笙 2021-01-22 05:14

I am using the jQuery $(\'selector\').css(\'top\') to get the top value to help position dynamic elements and I find that I get different results based on the browser.

i

2条回答
  •  太阳男子
    2021-01-22 05:30

    The thing is, none of your test elements actually have dynamic positioning. See this question: jQuery .css("left") returns "auto" instead of actual value in Chrome

提交回复
热议问题