javascriptvue.jsvuejs2bulmabuefy

Add css class to HTML or BODY tag in Vue.js 2.0


I'm using the CSS Framework Bulma, respectively their Navbar component. For this to work well I need to add a css class to the HTML or Body element:

<html class="has-navbar-fixed-top">

How can I add a class using vue.js 2.0?


Solution

  • First of all you shouldn't add any class tag on html tag.

    Second, you can and should add that class to body tag on your static index.html file that you probably find on your root folder or in your public folder.

    Let me know if works :)