jQuery.css(): Firefox don't return 'auto' values

前端 未结 4 1083
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-17 19:43

I\'m setting top or bottom and left or right values to a few elements. When i\'m trying to access this values with Firefox (16.0.2), i get a wrong value for top

4条回答
  •  臣服心动
    2020-12-17 20:04

    Just remove the position style and you will get auto instead of computed value.

    div {
        top: auto;
        bottom:20px;    
        right:20px;
        left:0px;
    }
    

    you can test it here.

提交回复
热议问题