css - 移动端字体适配问题
大家讲道理
大家讲道理 2017-04-17 14:33:19
0
2
856

在移动端设置

<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>

我的页面从iPhone6缩小到iPhone5后,页面内容能根据设备宽度适配,但是为什么字体的大小改变,没有做缩放和适配呢?还是高度设置一个固定值后也不做适配,这是为什么?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
洪涛

You have to write the font adaptation yourself. The most commonly used mobile font unit now is rem. You can try it. If you just want to distinguish between several resolutions and set different fonts, the simplest way is to use media queries ^ - ^

左手右手慢动作

Your piece of code is just a header tag, use rem or em instead of px, and the font size should also be added to the body of the css

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!