Put in order · Vue.js course · Module 2: Template Syntax

Inline Style Binding Methods

Arrange the style binding methods from simple to advanced:

Items to put in order

  • Computed: :style="computedStyles"
  • Object: :style="{ color: activeColor }"
  • Array: :style="[baseStyles, overrideStyles]"
Show the answer

Correct order:

  1. Object: :style="{ color: activeColor }"
  2. Array: :style="[baseStyles, overrideStyles]"
  3. Computed: :style="computedStyles"