2012-09-07 19 views
-2

可能重複:
Issue on IE7 when page is scrolling.Text is not properIE7重繪的錯誤,當我滾動頁面

當我滾動頁面搜索按鈕是不是proper.I在這裏使用的引導。

如果我正在減小字體大小,並使字體重量:正常它很好否則我在twitter引導文件中做同樣的問題即將到來。

enter image description here

這裏是測試服務器的URL

http://www.onetravel.com/travel/test/ot-bootstrap/index.html

請如果不能在IE7重現:-) thanx提前

+0

哎downvoters ??請問? – supersaiyan

回答

2

評論我無法重現IE7(瀏覽器和文檔模式設置爲7的IE9)。

請包含更多信息或可複製的示例,我很樂意提供幫助。

編輯:

看來,再用鼠標滾動後進入的頁面時,重繪按鈕。根據我的瀏覽體驗,很難注意到。我建議force it to redraw按鈕when it becomes visible

儘管可以進一步優化,但這個小的jQuery方法將處理該問題。如果需要調整,請對其進行測試並發表評論。

$('#my-button').RedrawWhenVisible(); 

$.fn.RedrawWhenVisible = function() 
{ 

    $(window).scroll(function() { 
     var docViewTop = $(window).scrollTop(); 
     var docViewBottom = docViewTop + $(window).height(); 

     var elemTop = this.offset().top; 
     var elemBottom = elemTop + this.height(); 

     // If element is partially visible... 
     if((elemBottom <= docViewBottom && elemBottom >= docViewTop) || (elemTop >= docViewTop && elemTop <= docViewBottom)) { 
      //Redraw it, just once. 
      if(this.attr('data-redraw')) {     
       this.hide().show(); 
       // Prevent further draws. 
       this.removeAttr('data-redraw'); 
      } 
     } else { 
      // The element is not visible... 
      if(!this.attr('data-redraw')) { 
       // Flag it to redaw on scroll. 
       this.attr('data-redraw','redraw'); 
      } 
     } 
    } 
} 

編輯2:

由於其他按鈕是好的,我敢打賭,這是一個非常特殊的CSS問題。仔細檢查這些CSS類的所有屬性,灰色按鈕是否正常,請檢查該按鈕與橙色/黃色按鈕的不同。

+0

只是滾動一頁,並檢查ie7。我添加了快照輸出 – supersaiyan

+0

「我無法在IE7中重現IE9(瀏覽器和文檔模式設置爲7的IE9)。」設置爲IE7模式的IE9不是「真正的」IE7安裝的完全準確表示。這很少見,但我看到一個錯誤發生在另一個錯誤中,反之亦然。 – daGUY

+0

沒有它dosnt工作:-( – supersaiyan