0
我試圖使用梯度LESS Bootstrap mixin的背景圖像,但它不工作,我已將所有Bootstrap .less
文件導入style.less
文件,我的theme.less
被導入(此文件)。每當我做了下面的咕嚕任務跑步者,不編譯theme.less文件。我有這樣的代碼:在背景圖像中添加一個LESS Bootstrap mixin
@base-url: '../img/backgrounds';
body {
background: #gradient.directional(#333; #000; 45deg), url('@{base-url}/bus.jpg'), no-repeat center center fixed; /* fallback */
background-size: cover;
overflow-x: hidden;
}
我也試過:
@base-url: '../img/backgrounds';
body {
#gradient.directional(#333; #000; 45deg), url('@{base-url}/bus.jpg'), no-repeat center center fixed; /* fallback */
background-size: cover;
overflow-x: hidden;
}
在第二個例子中,編譯器說,我有一個「)」缺少的行9列49
假設你想要的'不重複中心中心fixed'申請到'網址( '@ {base-url} /bus.jpg')',不應該用逗號分隔它們。逗號用於定義多個背景(如漸變背景和圖像背景之間的逗號) – henry