6 Use vue vue components add style

class bindings, inline style

  Array syntax: class = "[stylename]" js: data {stylename: classname}

  Object Syntax: class = {stylename: true}

Scoped CSS to achieve with vue-loader

In the style label components, the use of scoped, in which the defined style will only take effect in the current component

Vue-loader may be provided to allow the preprocessor css, add lang = "less / scss" label on syle

Guess you like

Origin www.cnblogs.com/shcs/p/11973756.html