Vue · Junior · Question 55 of 75
How do you bind several inline styles from an object?
<div :style="{ color: textColor, fontSize: size + 'px' }"></div>- ✓Correct answer: Bind
:styleto an object with camelCase (or quoted kebab-case) property names - 2Only strings are allowed in
:style - 3Use
v-style
Explanation
:style also accepts an array of objects. Vue adds vendor prefixes when needed.