【问题标题】:How to set the background image using Sass如何使用 Sass 设置背景图片
【发布时间】:2018-06-04 21:47:57
【问题描述】:

我尝试这样设置我的背景图片:

body
  font: 100% $font-stack
  background: url(images/body-bg.png) repeat #181d25

但它显示错误,即无效。谁能帮帮我?

【问题讨论】:

  • 你的sass中有分号吗?

标签: css sass


【解决方案1】:

images 文件夹是你的 css 文件夹的子目录吗?如果它是你的 css 文件夹的兄弟,你必须向上移动文件树。

background: url("../images/body-bg.png") repeat #181d25;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-30
    • 1970-01-01
    • 2012-04-02
    • 1970-01-01
    • 2023-03-25
    • 2019-09-25
    • 2020-04-17
    • 2013-02-21
    相关资源
    最近更新 更多