raoenhui / next-site-cn Goto Github PK
View Code? Open in Web Editor NEWnext.js中文文档网站
Home Page: http://nextjs.frontendx.cn
next.js中文文档网站
Home Page: http://nextjs.frontendx.cn
您好,想请教一下showcase使用svg画出过度图片是怎么实现的。
就是就showcase-manifest.js这个文件下面的mapping下面的data字段的值是怎么计算出来的。
感谢~
我想实现自定义路由/detail/2333
const express = require('express');
const next = require('next');
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(() => {
const server = express();
server.get('/detail/:id', (req, res) => {
const actualPage = '/detail';
return app.render(req, res, actualPage);
});
server.get('*', (req, res) => {
handle(req, res);
});
server.listen(8060, '0.0.0.0');
});
可是这样写没有效果,连服务都起不来了
求助
hello 您知道nextjs 中 post-pxtorem 怎么配置吗, 我配置后没法设置html 中根元素 font-size 大小,也就没法自定义 postcss-pxtorem 中rootValue 了 有什么解决办法吗~
谢谢~
我的postcss-config.js
`const autoprefixer = require('autoprefixer');
const pxtorem = require('postcss-pxtorem');
module.exports = {
plugins: [
autoprefixer({
overrideBrowserslist: ['> 1%', 'last 4 versions'],
}),
pxtorem({
rootValue: 70,
unitPrecision: 5,
propList: ["*"],
selectorBlackList: [/^.nop2r/, /^.am/],
replace: true,
mediaQuery: false,
minPixelValue: 0
})
],
};next.config.js
const withCSS = require('@zeit/next-css')
module.exports = withCSS()
const withSass = require('@zeit/next-sass')
module.exports = withSass({
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: "[local]___[hash:base64:5]",
}
}) 出现的问题如下: 我给一个h1标签设置字体大小
h1 {
display: flex;
flex: 1;
font-size: 20px;
width: 70px;
}`
但是在浏览器显示:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.