簡體   English   中英

如何在Firefox瀏覽器中更改字體大小

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

我的網站在除Firefox之外的所有瀏覽器中均能正常運行。 由於某種原因,瀏覽器會比其他任何瀏覽器都增加文本的大小,並將文本推出其div。 如何僅使用Firefox縮小文本?

我已經試過了這段代碼,但是沒有用,

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

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

    }//end if firefox

  </script>

使用它可能會幫助...

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