兼容各种浏览器的上下滚动代码


直接切入正题

红色的表示为要注意统一的。

蓝色是表示要更改的。

内容高度一定要大于box1的高度否则不会滚动,本框架用的是phpcms,大家可根据自己的框架更改循环。

演示地址http://www.er-china.com/index.php?m=content&c=index&a=lists&catid=789

zsbox"  style="width:700px; height:288px; overflow:hidden;">
    
box1" >
   
   
   <?php $i=0;?>
   {pc:content action="lists" catid="819" start="0" thumb="1" num="40" order="id asc,listorder asc,updatetime desc"}
   {loop $data $v}
   
   {if $n%4==0}{/if}
   <?php $i++?>
   {/loop}
   {/pc}   
   <?php
    //虚位以待
    $ii=(4-$i%4) ;
    for($y=0;$y<$ii;$y++){ ?>
    
    
   <?php 
    }
   
   ?>
   
   
   

       

       

      

   

       

       

      

    
   
     

  
     
box2">