移动端如何定义字体font-family
2015-09-18 14:48
351 查看
移动端如何定义字体font-family
中文字体使用系统默认即可,英文用Helvetica/* 移动端定义字体的代码 */ body{font-family:Helvetica;}
参考《移动端使用字体的思考》
移动端字体单位font-size选择px还是rem
对于只需要适配手机设备,使用px即可对于需要适配各种移动设备,使用rem,例如只需要适配iPhone和iPad等分辨率差别比较挺大的设备
rem配置参考:
html{font-size:10px} @media screen and (min-width:321px) and (max-width:375px){html{font-size:11px}} @media screen and (min-width:376px) and (max-width:414px){html{font-size:12px}} @media screen and (min-width:415px) and (max-width:639px){html{font-size:15px}} @media screen and (min-width:640px) and (max-width:719px){html{font-size:20px}} @media screen and (min-width:720px) and (max-width:749px){html{font-size:22.5px}} @media screen and (min-width:750px) and (max-width:799px){html{font-size:23.5px}} @media screen and (min-width:800px){html{font-size:25px}}
相关文章推荐
- call()和apply() 的区别
- Ubuntu下调试Android源码
- Android源码开发之预制视频音乐等资源
- android 图片最省内存压缩方法
- android wifi操作大全
- Android ExpandableListView单选以及多选实现
- T-SQL中的APPLY用法(半翻译)
- T-SQL中的APPLY用法(半翻译)
- Xcode7出现Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]
- T-SQL中的APPLY用法(半翻译)
- android:padding和android:margin的区别[转]
- 计算文本的高度并显示在label上出现灰色的线条
- Android Context为空
- android 相片显示歪斜解决办法
- iOS Xcode7 修改了info.plist 也不能联网问题
- android 加载webview时,保存并同步cookie实现免登陆
- Cocos Studio的csb文件中clone列表子元素,但动画未随之克隆的分析
- android图表
- android view坐标的理解
- Qt on Android,输入法弹出后,界面无法自适应