【问题标题】:Image paths in Compass CSS on WindowsWindows 上 Compass CSS 中的图像路径
【发布时间】:2012-04-14 16:27:28
【问题描述】:

我一直在我的 Windows 7 x64 机器上成功使用 SASS 和 Compass。在我尝试使用 replace-text-with-images mixin 之前,一切都运行良好。

我将尝试使用的图像放置在正确的位置(t:\Website\stylesheets\stylesheets\images 用于我的系统),并检查了我的 Compass 配置文件中是否启用了相关资产。不过,当我尝试编译时,我得到了这个:

t:\Website\stylesheets>compass watch -c config_with_refresh.rb
>>> Change detected to: code-n-apps.scss
WARNING: 'i_user.gif' was not found (or cannot be read) in t:/Website/stylesheets/images
Errno::ENOENT on line ["34"] of C: No such file or directory - t:/Website/stylesheets/images/i_user.gif
Run with --trace to see the full backtrace
>>> Compass is polling for changes. Press Ctrl-C to Stop.

该文件绝对位于该路径中,并且是可读的。

任何帮助将不胜感激。理想情况下,我希望 Compass 直接从我的生产服务器 (http) 中获取图像,但即使让它在本地工作也是一项重大改进。

【问题讨论】:

    标签: ruby sass compass-sass


    【解决方案1】:

    你说这是你的图片路径:

    t:\Website\stylesheets\stylesheets\images

    那它当然不会在里面找到i_user.gif

    t:/网站/样式表/图片/

    请仔细检查你的路径,注意你第一次使用stylesheets/stylesheets并且你想从stylesheets加载图像

    【讨论】:

      猜你喜欢
      • 2012-02-19
      • 1970-01-01
      • 1970-01-01
      • 2012-12-28
      • 2013-12-18
      • 2020-05-15
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多