Binding to Style attribute in Vue.js

January 9, 2018

I have the following Div element and I am going to change the font size using data object

Binding Style Example 1

This is the Vue instance and you have the font_size data object


We will see another style binding example where you can create data object and assign it to the style attribute

Binding Style Example 1
Binding Style Example 2

You can see following output for above two cases