.css(‘width’) and .css(‘height’) versus .width() and .height()

前端 未结 10 972
旧时难觅i
旧时难觅i 2021-01-07 19:44

Guys I\'ve been asking around and nobody can really tell me the benefits of using .css(‘width’) and .css(‘height’) rather than .width()

10条回答
  •  孤独总比滥情好
    2021-01-07 20:10

    they will also return/set different values (not talking about the 'px' suffix)

    if you have box-sizing: border-box

    see this example: http://jsbin.com/fugusixila/edit?html,css,js,console,output

提交回复
热议问题