Webpack 手写笔背景图像不显示
我想将图像加载为背景图像,但失败。我相信这与我的webpack.config.js有关。这是我的手写笔代码Webpack 手写笔背景图像不显示,webpack,stylus,Webpack,Stylus,我想将图像加载为背景图像,但失败。我相信这与我的webpack.config.js有关。这是我的手写笔代码 & .box background url("/images/center1.jpg") no-repeat right center -webkit-background-size cover -moz-background-size cover -o-background-size cover background-size cover
& .box
background url("/images/center1.jpg") no-repeat right center
-webkit-background-size cover
-moz-background-size cover
-o-background-size cover
background-size cover
这是我的网页
module: {
loaders: [
{
test: /\.styl$/,
exclude: /(node_modules|bower_components)/,
loader: 'style!css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]!postcss!stylus-loader?resolve url'
},
{
test: /\.(png|jpg|otf)$/,
exclude: /(node_modules|bower_components)/,
loader: 'url-loader?name=[path][name].[ext]&limit=8192'
},
{
test: /\.css$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
},
{
test: /\.scss$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?resolve url'
}
]
}
我在这里做错了什么吗?我在这里冒险,推测
&.box
应该在没有空格的情况下编写:&.box
。