如何设置固定的字体大小/防止浏览器缩放特定的单个元素? [英] How to set a fixed font size/ prevent browser scaling for a specific single element?

查看:131
本文介绍了如何设置固定的字体大小/防止浏览器缩放特定的单个元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望导航栏中的字体为固定大小-不受浏览器字体大小更改的影响.我对其余部分的内容很满意,但我的网站设计合理,无论任何情况,我都需要导航条文本保持相同的大小.

I want the font in my navigation bar to be a fixed size - not affected by browser font size changes. I'm totally fine with the rest of the text being fluid but the design of my site is such that i need the nav bar text to remain the same size no matter what.

这是我喜欢做的一个例子.不知道这是怎么做的.右上角的导航栏不受字体大小增加/减小的影响.如果有人可以帮助我,将不胜感激! :)

Here is an example of what i would LIKE to do. Don't know how this was done. The nav bar on the top right is unaffected by font size increase/decrease. If someone could clue me in it would be greatly appreciated! :)

http://studiogang.net/

我也不想使用图像,因为我想要的下拉菜单不适用于图像映射.或者至少,我宁愿不走那条路.

Also, I don't want to use an image instead, because the dropdown menu i want won't work with image mapping. Or at least, i'd rather not go down that road.

推荐答案

<ul id="navbar" style="font-size:14px">

</ul>

这篇关于如何设置固定的字体大小/防止浏览器缩放特定的单个元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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