Article directory
Preface summary
I am only making personal study records. Please forgive me if there are any mistakes.
Main learning links:Shang Silicon Valley Vue2.0+Vue3.0 full set of tutorials丨vuejs from entry to master
Three binding methods of class style (picture from reference link)
Most of them use the object writing method for style binding. The reason why it is written like this is for convenience of use and is a filtered writing method.
html code:
Writing method in data:
Style object, each style attribute must exist before writing.
:class
is the abbreviation of v-bind:class
, which changes static attributes into dynamic attributes.
style style (inline form)
html code:
Writing method in data:
Style object, each style attribute must exist before writing.
:style
is the abbreviation of v-bind:style
, which changes static attributes into dynamic attributes.
Summarize
This is the end.