Comments (6)
-
目前用的是 Iphone6 的尺寸
375
作为基准啊,没有问题。可以修改代码里面 html 根节点的基准值更改任意你想改的。 -
需要用到 background-size 是二倍以上的图,如果你的
slice
目录下有 @2x.png 的图,是会自动生成一张[email protected]
的精灵图的,代码也会自动生成相应的background-size
,如:
from weflow.
1.目前设计稿主流都是750呀~,另外对于不用媒体查询,而是用js设置rem的项目好像没考虑到噢(简单来说就是要设置75px=1rem怎么做呢)。
2.对于问题2,在750宽度设计稿时,如果用@2x的图,width和height对应生成的数值不对,您懂得哈。
这两个问题归根结底是因为375与750的设计稿吧,当初没考虑到这个问题,毕竟外面大部分项目都是750设计稿的哟(没法传图,重新发了封邮件带图的到您qq邮箱请查收)
from weflow.
看来你还是不明白,375 的二倍就是 750,你好好看 example 研究研究吧
from weflow.
- rem 和 px 之间的换算公式和比例是可以自己决定的,不一定非要 75px = 1rem,可以通读一下这个篇文 http://www.alloyteam.com/2016/03/mobile-web-adaptation-tool-rem/#prettyPhoto
- 如果要使用 rem 解决方案,建议放弃 雪碧图 拼合方案,转而用 HTTP 2.0 的特性不在合并图片到一张里。否则会触发 rem 与 雪碧图的 bug,导致计算结果有小数而造成的 Icon 毛边
from weflow.
px和rem转换公式和比例都是知道的,现在是自己陷入到另外一些问题上了,再琢磨一下,总之多谢两位。
from weflow.
@13714273163 rem 方案已经很完善了,主要的大坑在于要抛弃雪碧图使用,多亏有 HTTP 2.0 来解救
from weflow.
Related Issues (20)
- 编译如何避免将js切换成严格模式? HOT 2
- 字体库无法引入 HOT 2
- liveReload开启了,修改了css中的属性,但是并未生成 HOT 2
- 运行flexbox 编译不下去 去掉就可以了 HOT 1
- 编译reversion时报错 HOT 1
- 文件路径匹配的 ! 不起作用 HOT 2
- 下载报错 HOT 2
- 官网无法访问 HOT 1
- macOS重装weflow之后无法导入项目 HOT 1
- REM配置了无效 HOT 1
- weflow 打包输出目录,能否去除html/ 这一层目录 HOT 1
- 官网的下载和查看demo页面报错 HOT 1
- weflwo都需求环境?除了nodejs 很多功能有问题,是不是我的环境缺少?比如ftp功能老报错internal/util.js:32 Ftp.raw[mkd](args): Use Ftp.raw('mkd args') instead HOT 2
- 需要什么运行环境? HOT 1
- ftp 上传不成功 HOT 2
- 官网无法下载 HOT 1
- slice文件夹 HOT 1
- change lang opt ? ;"(
- Hii 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 weflow.