jQuery css('padding') - Issue with Firefox

让人想犯罪 __ 提交于 2019-12-04 22:34:46

See bug #13421 (although this is not actually a bug).

The documentation for css() says:

Shorthand CSS properties (e.g. margin, background, border) are not supported. For example, if you want to retrieve the rendered margin, use: $(elem).css('marginTop') and $(elem).css('marginRight'), and so on.

padding is such a property, so you will indeed have to use paddingLeft, paddingRight, etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!