2013年6月27日 星期四

以往可以用加上 -webkit-text-size-adjust : none 解決,但新版 Chrome 已經將 -webkit-text-size-adjust 支援移除。所以必須改以 -webkit-transform : scale( ... ) 處理, scale 中的數字為要設定的字型大小除以 12px ,例如 9px 就是 9 / 12 = 0.75 。請注意 display : inline 無法 transform ,請視情況加上 display : inline-block ,且目前看來 transform 會破壞字的間距:

-webkit-transform : scale(0.75);


from http://blog.xuite.net/vexed/tech/59449347-Chrome+font-size+%E5%B0%8F%E6%96%BC+12px

2013年6月19日 星期三

解決fadeIn與fadeOut在mouseover與out的動作後會持續重複動畫

$(".navleng").mouseover(function() { //When trigger is clicked...
 
      $(this).find(".head_subnav").fadeIn(300).slideDown('fast'); //Drop down the subnav on click

      $(this).hover(function() {
      }, function(){
          $(this).find(".head_subnav").stop(true).fadeOut(300).slideUp('fast');
      });  
 
  });

在hover的相反裡加入.stop(true)即可,然後剛滑入時的fadeIn不要加。