首页 > 移动平台 > 详细

移动端如何定义字体font-family

时间:2015-09-18 15:37:28      阅读:220      评论:0      收藏:0      [点我收藏+]

移动端如何定义字体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}}

移动端如何定义字体font-family

原文:http://www.cnblogs.com/qq309240790/p/4819204.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!