-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何让maxDisplayWidth只针对某个class或者某个页面,而不是一设置上来就是限制全局 #35
Comments
可以设置 |
不行,我设置过,include或者exclude选项不生效
一设置就是全局 |
你的系统是 Windows 吗,Windows 路径分隔符号和 Mac 不同。 |
我是在mac上开发 |
方便的话给我个最简包,我本地调试一下。按理 include 是能生效的,我这两天刚写了个例子就是只生效 include 内的文件,https://github.com/wswmsword/postcss-mobile-forever/tree/main/example/cases/include-only。 |
你的这个参数再增加 maxDisplayWidth:750 然后在google浏览器responsive模式下拉伸 |
我试了一下,配置是这样的: module.exports = {
plugins: [
["postcss-mobile-forever", {
viewportWidth: 750,
maxDisplayWidth: 750,
// enableMediaQuery: true,
appSelector: "#root",
// demoMode: true,
include: [/pages[\\/](mobile|watch)/],
side: {
selector1: ".footer",
}
}],
],
}; 按照上面的配置,这个 demo 里, |
项目我下载下来看了和试了,你说了半天,你是在多入口页面的情况下嘛,分别是有多个html页面和入口。我说的是在vue和react单页面,单入口,只有一个html入口文件的情况 |
你提供一个简包,打包成 zip,复制粘贴到这个评论框,我下载下来本地调试一下。 |
vue-online_1.zip |
我知道你意思了,这个主要是因为 |
这样确实可以,我试过了,还需要在样式表里面写点这个选择器的样式才会生效,就算你弄个空占位也不行 |
空占位估计是被哪个产包优化的插件给删掉了,到 mobile-forever 的时候就检测不到了 |
No description provided.
The text was updated successfully, but these errors were encountered: