3

コンパスサスのスプライトの../images..を出力する方法は?
そして、コンパスサススプライトのシニアトーチュリアルのドキュメントをどこで見つけることができるか知っている人はいますか?公式サイトにはないsprite-url関数など。

--css
--sass
    --test.scss
--images
--sprite-images
    --icons
        --a.png
        --b.png

.test.scss codes:
-----------------------
$sprite: sprite-map("icons/*.png");
.hello{
    background-image : sprite-url($sprite);
}

outputs
------------------------
.hello{
    background-image : url('/images/icons-s2c837140f3.png');
}

<!-- but I want to output  -->
.hello{
    background-image : url('../images/icons-s2c837140f3.png');
}
4

1 に答える 1

7

編集:http_path = '../'確かにあなたが必要なものかもしれません。

こちらもご覧ください:http generated_images_dir//compass-style.org/help/documentation/configuration-reference/

カスタムproject_pathまたはproject_dirを設定していない場合は、それをに設定できるはずですが、true../imagesに設定する必要がある場合もあります。relative_assets

そして、ここにあるものを除いて、sprite-urlとそのようなヘルパーについて知る必要があることは他にあまりありません:http ://compass-style.org/reference/compass/helpers/sprites/または上の問題GitHub

于 2012-12-15T03:54:31.713 に答える