萨斯背景图像 [英] Sass background images

查看:141
本文介绍了萨斯背景图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我去过这个页面: Sass和Compass中的背景图片路径<似乎它应该是我的问题的答案,但我错过了一些东西。这是我的代码:

I have been to this page: Background images path in Sass and Compass and it seems like it should be the answer to my question, but I am missing something. Here is my code:

config.rb

config.rb

images_dir = 'img'

sass file

sass file

header { background: image-url('raeshineLogo.png', false, false); }

输出到:

  header {
  background: url('/img/raeshineLogo.png');
  }

好像它应该有用,路径是正确的,但我错过了什么?

Seems like it should work, the path is correct, but what am I missing?

推荐答案

解决了!我想,这是一个愚蠢的错误。但事实证明这与路径无关。

Solved! As I thought, it was a silly mistake. But it turned out to have nothing to do with the path.

如果此页面上出现类似问题的任何人,请参阅上面链接到其他Stack Overflow问题,以及此页面: http://compass-style.org/reference/compass/helpers/urls/ (maxbeatty的答案的一部分)。

If anyone happens upon this page with a similar issue, see link above to the other Stack Overflow question, and this page: http://compass-style.org/reference/compass/helpers/urls/ (part of maxbeatty's answer).

这篇关于萨斯背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆