Closed maozhenhua2 closed 9 years ago
图片路径不对,所以无法获取尺寸。
请升级到 V2.0 版本,尝试修改路径,url 中的图片路径是 CSS 文件相对图片的路径。
Still running into this issue with v2.0, in my case with a background-image
property and an absolute path like background-image: url(/x-img/image.png)
Same issue here.
Needs fix asap, as this prevents from using cssgrace in gruntfiles for a certain amount of setups.... refer to #33
D:/work/demo_test/js/foundation/foundation/下
--Gruntfile.js --app1/ ----css/ ------content.css ----img/ ------background.jpg
content.css里 .pic2 { background: url('../img/background.jpg?1421738406') no-repeat top left; }
Gruntfile.js里 postcss: { options: { processors: [ require('postcss-custom-selector')(), require('cssgrace'), ] }, dist: { src: 'app1/css/*.css' } }
运行grunt potcss会出错 Warning: ENOENT, no such file or directory 'D:\work\demo_test\js\foundation\img\pic2.jpg?1421738406' Use --force to continue.
实际的图片路径是D:\work\demo_test\js\foundation\foundation\app1\img\pic2.jpg?1421738406 请问是我Gruntfile.js里路径设置有问题还是其他什么原因