为什么字体大小的大众汽车无法在野生动物园工作? [英] why font-sizing vw not working in safari?

查看:91
本文介绍了为什么字体大小的大众汽车无法在野生动物园工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用vw作为字体大小的单位,因此在调整浏览器大小时看起来会很好. 但是,当我在Safari中浏览内容时,内容就会运行,有人知道如何解决吗?谢谢

I'm using vw as the unit for my font size, so that it will look nicely when resize the browser. However, when I browse it at Safari, the content run, anyone know how to solve it? thanks

CSS

.flatNav {
    background-image: url(../img/navBar.png);
    background-repeat: repeat-x;
    width: 90%;
    margin-right: auto;
    margin-left: auto;
    font-size: 0.8vw;
    height: 48px;
    position: relative;
    top: 28px;
    background-position: center;
}

.flatNav ul {
    list-style-type: none;
    height: 48px;
    width: 75%;
    margin-right: 1.46vw; 
    margin-left: 1.46vw; 
    position: relative;
    top: -47px;
}

推荐答案

REM是一种字体值,适用于调整浏览器的大小,但存在某些浏览器兼容性问题.

REM is a font value which works well for browser resize but there are certain browser compatibility issues.

EM可以很好地使用,它们在调整浏览器大小和响应网站时也能很好地发挥作用.这也适用于所有浏览器.

EMs could very well be used and they will do a good job during browser resizing and in responsive websites too. This works across browsers too.

如果要将像素转换为EM值并使用相同的值,请访问此网站: http://www. pxtoem.com/

Check out this website if you want to convert your pixels to EM values and use the same: http://www.pxtoem.com/

希望这会有所帮助.

这篇关于为什么字体大小的大众汽车无法在野生动物园工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆