【问题标题】:Vue CLI3 instant prototyping import CSSVue CLI3 即时原型导入 CSS
【发布时间】:2018-06-29 12:23:50
【问题描述】:

如何使用 Vue CLI3 添加或导入 CSS 到即时原型设计中?

我通过vue serve MyComponent.vue 提供我的原型,但如果我将<style> 标签添加到模板中,它会被忽略...

我想导入 Tailwind CSS。

<template>
  <div id="ds-configurator" class="test">
    Test
    dva
  </div>
</template>

<!-- this is ignored when served -->
<style>
html, body {
  height:100%;
  min-height:100%;
}

#ds-configurator, .test {
  background: #eee;
}
<style>

【问题讨论】:

    标签: vue.js vue-cli


    【解决方案1】:

    我发现我可以提供我自己的index.html,在那里我可以导入 Tailwind CSS 或其他任何东西。

    【讨论】:

      猜你喜欢
      • 2020-06-14
      • 2019-07-27
      • 2019-07-12
      • 2019-12-16
      • 2019-07-02
      • 2019-02-07
      • 2020-06-23
      • 2018-10-13
      相关资源
      最近更新 更多