Access the -webkit- vendor prefix in JavaScript

后端 未结 3 1369
独厮守ぢ
独厮守ぢ 2020-12-16 02:39

If I were writing a JavaScript line to set a style attribute of an element it could look like this (this example: \"width\"):

document.getElementById(\'myDiv         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 02:51

    If you don't want to keep digging up those pesky style properties and their naming conventions you can always use jQuery to keep it simple.

    $('#myDiv').css("-webkit-transition", "value");
    

提交回复
热议问题