添加 css class 到 HTML 或 Vue.js 2.0 中的 BODY 标签

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

我正在使用 CSS 框架 Bulma, respectively their Navbar 组件。为了使其正常工作,我需要将 css class 添加到 HTML 或 Body 元素:

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

如何使用 vue.js 2.0 添加 class?

body 和 html 标签在 index.html 文件中。您只能在此处添加 class。

首先你不应该在 html 标签上添加任何 class 标签。

其次,您可以而且应该将 class 添加到静态 index.html 文件的 body 标记中,您可能会在根文件夹或 public 中找到该文件文件夹。

如果有效请告诉我:)