猿问

水晶报表超出div,不受div滚动条控制

<div style="overflow: scroll; height: expression(document.body.clientHeight-28); width:expression(document.body.clientWidth); text-align: center; float:left;">
    <table cellSpacing="0" cellPadding="0" border="1" bordercolor="#ff00ff">
     <tr>
      <td vAlign="top" align="left">
       <CR:CrystalReportViewer id="CrystalReportViewer1" runat="server" HasZoomFactorList="False"
        HasSearchButton="False" HasPrintButton="False" HasGotoPageButton="true" HasExportButton="False"
        PrintMode="ActiveX" DisplayGroupTree="False" HasViewList="False" HasToggleGroupTreeButton="False" HasDrillUpButton="False"
        HasCrystalLogo="False" AutoDataBind="true"></CR:CrystalReportViewer>
      </td>
     </tr>
    </table>
   </div>
水晶报表超出div,不受div滚动条控制:div滚动条滚动时,报表内容不动。

(HTML 4.0时正常,XHTML 1.0时不受div滚动条控制)


慕娘9325324
浏览 690回答 2
2回答

大话西游666

你要添加一个固定不动的代码<div style="position:absolute;z-index:100;background:#eeeeee;margin-top:1px;">固定不动的内容在此</div><div style="overflow:scroll;width:200px;height:200px;border:1px solid red;position:absolute;z-index:1;padding-top:10px;"><div style="width:100px;">ggggggggg<br/>gggggggg<br/>gggggg<br/>ggggg<br/>gggggg<br/>ggggg<br/>gggggggg< br/>ggggggg<br/>ggggggg<br/>ggggggggg<br/>gggggsda<br/>fgsdfsdfsdfsdfsd </div>&nbsp;</div></div>或者你就用finereport做,更加直接一些
随时随地看视频慕课网APP
我要回答