简体   繁体   English

如何在Firefox浏览器中更改字体大小

[英]How to change font-size in Firefox Browser

My website works great in every browser except for Firefox. 我的网站在除Firefox之外的所有浏览器中均能正常运行。 For some reason the browser increases the size of the text larger than any other browser and it pushes the text out of its div. 由于某种原因,浏览器会比其他任何浏览器都增加文本的大小,并将文本推出其div。 How can I make the text smaller for only Firefox? 如何仅使用Firefox缩小文本?

I have tried this code but it did not work, 我已经试过了这段代码,但是没有用,

 <script>
    if ($.browser.mozilla) {

        $('.first_develop_div').css({
         'font-size': '12px'
        });
        $('.second_develop_div').css({
         'font-size': '12px'
        });

    }//end if firefox

  </script>

use this it may help... 使用它可能会帮助...

if( navigator.userAgent.indexOf("Firefox") != -1 ) {      
  $('.first_develop_div').css({
     'font-size': '12px'
    });
    $('.second_develop_div').css({
     'font-size': '12px'
    });
return "Firefox";
} 
else {
return "unknown";
 }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM