修复了IE中的标题问题

时间:2016-03-28 10:00:23

标签: javascript html5 css3

我在IE中面临修复标题问题。修复了标题css在IE中无法正常工作。它正在其他浏览器中工作。只有它不是IE中的蠕虫 请帮助任何一个。我有javascript.pls添加的CSS帮助任何人。

HTML:

  <div id="tab-1">
  <div class="loadedTable">   
    <table id="table-1">
    <caption> table</caption>
    <thead class="fixedHeader">
      <tr> 
        <th style="width:2%">header1</th>
        <th style="width:2%">header1</th>
        <th style="width:2%">header1</th>
        <th style="width:2%">header1</th>
        <th style="width:2%">header1</th>

      </tr>
    </thead>
    <tbody>
      <tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td> 
      </tr>
      <tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td> 
      </tr><tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td> 
      </tr>
      <tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td> 
      </tr>

    </tbody> 
    </table>  
    </div>
    </div>

使用Javascript:

    var wrapperCon= $('#wrapperCon');
    wrap.scroll(function(e){ 
        fixedHeader();          
    });

   variableHeight =  Math.abs(wrapperCon.offset().top - $('#tab-1 .loadedTable').offset().top)+19;
      function fixedHeader(){   
        $(document).find('.fixedHeader').each(function(){ 
            $(this).css('width', $(this).find('table').width());
        });
        var tabid = $(".ui-tabs-active").attr('aria-controls'),
            myTabsIdHeightt = $('#mytabsId').find('ul').height(),
            WidthDiv1Ht = $('#'+tabid).find('.WidDiv1').height();
            FinalHt = myTabsIdHeightt+WidthDiv1Ht+67;


        if(wrap.scrollTop() > variableHeight){ 
                if(ie){

                $(document).find('.fixedHeader').css({'position':'relative','top':(wrap.scrollTop()-FinalHt)+'px'});  
                }else
                {

                $(document).find('.fixedHeader').css({'position':'relative','top':(wrap.scrollTop()-FinalHt)+'px'}); 
                }
        }else{
            $(document).find('.fixedHeader').removeAttr('style');
        }           
    } 

0 个答案:

没有答案