jes*_*ica 3 css reactjs next.js
图像不是从用于背景的 CSS 文件加载的,而是在 jsx 中加载的
在 CSS 文件中,我使用如下
.main-banner {
position: relative;
height: 910px;
z-index: 1;
background: transparent url(../../static/images/banner-bg1.jpg) right top no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
图片网址绝对没问题
和这样的配置文件
//next.config.js
const withImages = require('next-images');
const withCSS = require('@zeit/next-css')
module.exports = withImages(withCSS({
cssLoaderOptions: {
url: false
}
}))
Run Code Online (Sandbox Code Playgroud)
实际上是什么问题?
谢谢
| 归档时间: |
|
| 查看次数: |
7444 次 |
| 最近记录: |