Comments (11)
方便地话配个截图我看下。
from postcss-mobile-forever.
from postcss-mobile-forever.
这是小程序吗,我也没试过小程序用这个插件。能看到这个白边是什么样式吗,有可能不是插件的问题,插件没有额外添加边框、边距之类的属性,只有在打开 border
选项的时候会在指定的 appSelector
的样式上加一个 box-shadow
。
from postcss-mobile-forever.
这不是插件,是企业内部自己APP里面的h5微应用
from postcss-mobile-forever.
好的,那这个 h5 如果不放到 APP 里,直接从浏览器访问是正常的吗?
from postcss-mobile-forever.
浏览器访问是正常的
from postcss-mobile-forever.
能看出来这个白边是什么属性导致的吗?
from postcss-mobile-forever.
我把这个关了再试试
// 适配到桌面端时,展示的视图宽度
desktopWidth: 430,
// 适配到移动端横屏时,展示的视图宽度
landscapeWidth: 425,
from postcss-mobile-forever.
ok,你现在这个是媒体查询模式,还有个 CSS 函数的模式也可以试试,大概是下面这样:
module.exports = () => {
return {
plugins: {
'postcss-mobile-forever': {
// 应用基于该宽度进行开发,转换后的伸缩视图将会以该宽度的视图作为标准进行比例伸缩
viewportWidth: 750,
// 页面最外层选择器,例如“#app”,用于设置在桌面端和移动端横屏时的居中样式
appSelector: '#app',
// 限制视口单位的最大宽度
maxDisplayWidth: 750,
// 选择器黑名单,名单上的不转换
selectorBlackList: ['md-'],
// 排除文件或文件夹
exclude: [/node_modules/]
}
}
}
}
原来你的配置应该也有点问题,maxDisplayWidth
和 enableMediaQuery
、desktopWidth
、landscapeWidth
不应该同时出现。
from postcss-mobile-forever.
好的,我试试!谢谢你
from postcss-mobile-forever.
不客气,有问题及时反馈。
from postcss-mobile-forever.
Related Issues (20)
- 有个nuxt3官网项目,准备同时适配PC和移动端,有插件相关demo参考下吗 HOT 2
- 配置include和exclude不生效 HOT 11
- bug: css 变量默认值不转换 HOT 1
- 可以增加一个最小宽度的限制么,目前我的需求是pc端适配,移动端不适配 HOT 1
- About Nuxt DevTools Width Display HOT 4
- 设置了之后移动端和pc端是不是都会限制最大宽度 HOT 13
- postcss-mobile-forever版本4.1.2在 Vue3 vite5 配置不生效 HOT 4
- 媒体查询中的 vw 转换 HOT 10
- Vant4项目使用之后popup的mask半透明黑色背景不会宽度100%了 HOT 2
- 在webcompent组件中不生效,已禁用shadow HOT 6
- 设置 include unocss 无法转换 HOT 9
- uni-app使用 HOT 3
- 如何让maxDisplayWidth只针对某个class或者某个页面,而不是一设置上来就是限制全局 HOT 13
- `border` 属性的实现,用 `box-shadow` 去模拟是否会更合适 HOT 2
- 设置桌面端最大宽度 HOT 2
- 能否支持在转换成vw时,让某些竖直方向的属性,比如height,使用vh HOT 5
- 当我设置了background-attachment: fixd, 背景图片显示效果不对,应该如何调整 HOT 1
- 关于开启border后,min-height: 100vh 属性在ios下的问题 HOT 1
- [Feature] The 1px scenario needs to be considered HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-mobile-forever.