1

is it possible to style a -webkit css property with .style? or setAtrrtibute() is the way to go?

1

1 Answer 1

3

There is a way of getting an object's or element's property with brackets: object["property"] works the same as object.property. In the string, there is allowed to have a dash at the start.

To set a '-webkit' style property, just use element.style["-webkit..."] = "a value".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.