4

Time for 3 hours I checked why LESS doesn't set the background image for the needed container. Please, if someone can tell me what's wrong in my script(I tried all the possibilities found on stackoverflow but nothing worked for me).

This is my code:

@imagesDir:"../images/newImages18072013";
#header
{
    background-image: url("@{imagesDir}/headerBack.gif");
}

The result in browser it's:

#header {
           background-image: url("@{imagesDir}/headerBack.gif");
}

So, everything I tried I obtained the same result in browser, it looks like it's not processed.

4

1 回答 1

7

是不是你写错了?

@base-url: "http://assets.fnord.com";
background-image: url("@{base-url}/images/bg.png");

来自: http: //lesscss.org/#-string-interpolation

于 2013-07-18T09:55:06.733 回答